Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A static permission is always mapped to a permission string, and is not evaluated based on the current context prior to a permission check. The context consists of the page and asset type been accessed by a given user.

Example:

At any given time, if you check the permission for the lifecycle permission (/_system/governance/permission/admin/manage/resources/govern/lifecycles), it will not change based on the asset type.

...

A dynamic permission is a permission that is always evaluated at runtime. It is a function callback that can return a String, which represents a permission or a Boolean value indicating whether a permission was evaluated successfully or not.

Example:

Code Block
Permissions.ASSET_CREATE = function(ctx) {
    	if (!ctx.type) {
        		throw 'Unable to resolve type to determine the ASSET_CREATE permission';
    	}
    	return '/permission/admin/manage/resources/govern/' + ctx.type + '/add';
};

...