Class EditGlobalPermissionsAction

All Implemented Interfaces:
Evented<GlobalPermissionsUpdateEvent>, BootstrapAware, WebInterface, EditPermissionsAware, PermissionsAware, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public class EditGlobalPermissionsAction extends AbstractEditPermissionAction implements Evented<GlobalPermissionsUpdateEvent>
See Also:
  • Constructor Details

    • EditGlobalPermissionsAction

      public EditGlobalPermissionsAction()
  • Method Details

    • validate

      public void validate()
      Description copied from interface: EditPermissionsAware
      Validate the form
      Specified by:
      validate in interface EditPermissionsAware
      Specified by:
      validate in interface MessageHolderAware
      Specified by:
      validate in interface org.apache.struts2.Validateable
      Overrides:
      validate in class AbstractEditPermissionAction
    • execute

      public String execute() throws Exception
      Description copied from interface: EditPermissionsAware
      Add and remove the permissions
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Specified by:
      execute in interface EditPermissionsAware
      Overrides:
      execute in class org.apache.struts2.ActionSupport
      Returns:
      SUCCESS if completed
      Throws:
      Exception
    • getEventToPublish

      public GlobalPermissionsUpdateEvent getEventToPublish(String result)
      Description copied from interface: Evented
      Gets the event to publish.
      Specified by:
      getEventToPublish in interface Evented<GlobalPermissionsUpdateEvent>
      Parameters:
      result - the result of the action executing.
      Returns:
      the event. Can be null, in which case no event will be published.
    • canSetPermissionOnUser

      public boolean canSetPermissionOnUser(String permission, String username)
      Determines whether the logged in user can set the permission for the user. Used by velocity
      Parameters:
      permission - permission to be set
      username - user for permission
      Returns:
      true if permission can be set, false otherwise
    • canSetPermissionOnGroup

      public boolean canSetPermissionOnGroup(String permission, String groupName)
      Determines whether the logged in user can set the permission for the group. Used by velocity
      Parameters:
      permission - permission to be set
      groupName - group for permission
      Returns:
      true if permission can be set, false otherwise
    • isConfluenceAdministratorsGroup

      public boolean isConfluenceAdministratorsGroup(String groupName)
      Determines whether the group is confluence administrators
      Parameters:
      groupName - the group to check
      Returns:
      true if permission can be set, false otherwise
    • canSetSystemAdministratorPermission

      public boolean canSetSystemAdministratorPermission()
      Determines whether the logged in user can set the system admin permission. Used by velocity
      Returns:
      true if permission can be set, false otherwise
    • isAllowAnyLicensing

      public boolean isAllowAnyLicensing()
    • isAllowPerGroupLicensing

      public boolean isAllowPerGroupLicensing()
    • isAllowPerUserLicensing

      public boolean isAllowPerUserLicensing()
    • getGuardPermission

      public String getGuardPermission()
      Description copied from interface: PermissionsAware
      Obtains the relevant guard permission for the action
      Specified by:
      getGuardPermission in interface PermissionsAware
      Returns:
      the relevant guard permission for the action
    • populateAdministrator

      public void populateAdministrator()
      Specified by:
      populateAdministrator in interface PermissionsAware
    • isPermitted

      public boolean isPermitted()
      Description copied from class: ConfluenceActionSupport
      Overrides:
      isPermitted in class ConfluenceActionSupport