Update GAM Application Permissions

Official Content
This documentation is valid for:

The GAMApplication object of GeneXus Access Manager Library provides methods which can be used to add, update, and delete GAM Permissions in the Application.

Before adding GAM Permissions to Users or to GAM Roles, the Permission needs to be added in any of the GAM Applications of the Repository.

This can be done using the GAM Web Backoffice or just programatically using the GAM API.

AddPermission Method of GAMApplication Object

Syntax

GAMApplication.AddPermission(in:GAMApplicationPermission,out:GAMError Collection) : Boolean

Example

In order to add a new Permission in the Application you need to define a GAMApplicationPermission object type variable.

&GAMApplicationPermission = new()
&GAMApplicationPermission.Name = 'MyPermission1'
&GAMApplicationPermission.Description = 'MyPermission1'
&GAMApplicationPermission.AccessType = GAMPermissionAccessTypeDefault.Restricted //Possible values are Allow, Deny, Restricted
&isok = &Application.AddPermission(&GAMApplicationPermission,&Errors)
if &isok
   commit
else
   For &Error in &Errors
       Msg(Format(!"%1 (GAM%2)", &Error.Message, &Error.Code))
   EndFor
endif

UpdatePermission Method of GAMApplication Object

Syntax

GAMApplication.UpdatePermission(in:GAMApplicationPermission,out:GAMError Collection) : Boolean

DeletePermission Method of GAMApplication Object

Syntax

GAMApplication.DeletePermission(in:GAMApplicationPermission,out:GAMError Collection) : Boolean





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.