hasPermission
Last updated
Last updated
hasPermission is a helper function to check for signed in users permissions.
This method is built along with Permissions to check for the configured permissions for mapped ids
hasPermission is a function that takes in the ID for the permission you want to match against, then checks which roles are mapped to it and determines if the current user has this role, then returns a boolean value depending on the outcome.
PERMISSION_TO_CREATE_ID and PERMISSION_TO_UPDATE_ID are ids that has been registered with permissionKeys with Plugin.register() method