apply roles - UpendoVentures/Upendo-Dnn-Prompt GitHub Wiki
apply-roles
When building and maintaining a DNN-based website, it's often useful to create and use a security role that helps empower someone to have nearly Administrator permissions, but not quite. In this case, you can create and apply a new security role named Site Admin
and apply it to all pages in the site.
Added In Version
Command
Command | Description |
---|---|
apply-roles |
This command is used to assign Edit and View permissions to all pages in a specified portal for a given role. It's useful for ensuring consistent permissions across all pages of the portal. |
Arguments
The flags below can help you determine exactly how to use this prompt.
Flag | Type | Default | Description |
---|---|---|---|
--portalid |
Integer | (none) | The --portalId flag specifies the portal ID where the roles will be applied. |
--rolename |
String | Site Admin |
If specified, the name of the role you wish to create, otherwise it will use the default. |
Output
If successful, you will see a confirmation message for each page, indicating that the permissions were applied correctly.
Success Example:
Successfully applied "Site Admin" role to all pages in portal 1.
Failure Example:
Error applying role "Site Admin" in portal 1.
(if this happens, check the Admin Log to see why, or run set-debug
and then check the Log4NET log file for more details.)
Additional Notes
None.
Screenshots
Example: Command Use
Example: Help
Example: Success
Example: New Role Created & Applied