Xbasic

A5_CHANGE_PERMISSION Function

Syntax

V a5_change_permission(C cGroup ,C name ,C class ,C permission ,C action [,C master_password ])

Arguments

cGroupCharacter

The name of the group for which you are changing permissions.

nameCharacter

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

classCharacter

The type of object for which you are changing permissions. Valid values are:

Object Class
File Extension 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

permissionCharacter

The permission that is being changed. Valid values are detailed below.

The following values are used with Sets:

  • "Default browse"
  • "Default form"
  • "Delete"
  • "Design"
  • "Drop"

The following values are used with Tables:

  • "Change records"
  • "Default browse"
  • "Default form"
  • "Delete records"
  • "Enter records"
  • "View records"

The following values are used with All Other Objects:

  • "Delete"
  • "Design"
  • "Run"
actionCharacter

Action Valid actions are:

"grant"
"deny"
"remove"

Removes the group from object permissions, leaving default permissions.

master_passwordCharacter

Default = "". Master_Password is the administrator's password and is only necessary if not logged on as administrator.

Description

Change permissions on an object for a given group.

Discussion

The A5_CHANGE_PERMISSION() function changes a user password and associated object permissions.

Example

The following example is the equivalent of going to "Set Security" for the Customer Information form, and granting access to the admin group.

a5_change_permission("Admin", "customer [email protected]", "form", "run", "grant", "alpha")

Limitations

Desktop applications only.

See Also