Xbasic

A5_GROUP_HAS_PERMISSION Function

Syntax

Result as C = a5_group_has_permission(C cGID ,C name ,C class ,C permission ,C default_mode )

Arguments

Result

"Grant" = The group has been given the indicated permission to the object. "Deny" = The group was not given the indicated permission.

cGID

The ID of the group.

name

The name of the object and the data dictionary that contains it.

class

The type of object for which has the Permission. Valid values are:

Object Class (Filename Extension of Data Dictionary used in Name parameter)
"Table" (table name)
"Form" (.DDD or .SET)
"Browse" (.DDD or .SET)
"Report" (.DDD or .SET)
"Letter" (.DDD or .SET)
"Label" (.DDD or .SET)
"Function" (.ALB)
"Script" (.ALB)
"Menu" (.ALB)
"Toolbar" (.ALB)
"Append records" (.DDD or .SET)
"Convert case of fields" (.DDD or .SET)
"Crosstab" (.DDD or .SET)
"Delete/Mark/Unmark records" (.DDD or .SET)
"Export records" (.DDD or .SET)
"Import records" (.ALB)
"Intersect/Join/Subtract records" (.DDD or .SET)
"Post records" (.DDD or .SET)
"Query records" (.DDD or .SET)
"Search and replace" (.DDD or .SET)
"Update records" (.DDD or .SET)
permission

The permission that is being queried. Valid values are:

Sets
>
"Default browse"
"Default form"
"Delete"
"Design"
Tables
>
"Drop"
"Change records"
"Default browse"
"Default form"
"Delete records"
"Enter records"
"View records"
All Other Objects
>
"Delete"
"Design"
"Delete"
"Design"
"Run"
default_mode

Default permission to assign if explicit permission is not available. "Grant" "Deny"

Description

Returns .T. if specified group has all permission to name/class, .F. otherwise

Discussion

The A5_GROUP_HAS_PERMISSIONS() is an internal function that returns the permission to a class for a group. A5_HAS_PERMISSION()calls A5_Group_Has_Permission() for each group to determine the group's access rights. You can get a group's Group_ID with the A5_Sec_Get_GID()function.

Example

dim GID as C
GID = A5_Sec_Get_GID("Sales", "mydb.alb") 
? A5_Group_Has_Permission(GID, "myform", "form", "run", "deny")
= "grant"

Limitations

Desktop applications only.

See Also