The function CheckSecurityLevel checks whether the current user has access to the specified security level.
|Function||Group||Execution||Windows||Embedded||Thin Client||Mobile Access|
- The security level to be checked.
- The type of security level to check: 0 is Runtime, 1 is Development.
This is an optional parameter; if no value is specified, the default value is 0.
|0||The current user does not have access to the specified security level.|
|1||The current user has access to the specified security level.|
Each user can belong to multiple groups, and those groups typically have access to different security levels. Rather than check the groups to which a user belongs, and from that try to determine the security levels to which the user has access, you can use this function to check the security levels directly.
For more information about groups and security levels, see Group Account dialog.
The user “Bob” belongs to the groups “GroupA” and “GroupB”. GroupA has access to runtime levels 10 to 20, and GroupB has access to development levels 30 to 40. That means Bob has access to runtime security levels 10 to 20 and development security levels 30 to 40.
…it returns a value of 1, meaning that Bob has access.
…it again returns a value of 1.
…it returns a value of 0, meaning that Bob does not have access.