Class CNProjectACL.CollabNetRoles

  • Enclosing class:
    CNProjectACL

    public static class CNProjectACL.CollabNetRoles
    extends Object
    • Field Detail

      • HUDSON_READ_ROLE

        public static final CollabNetRole HUDSON_READ_ROLE
      • HUDSON_BUILD_ROLE

        public static final CollabNetRole HUDSON_BUILD_ROLE
      • HUDSON_CONFIGURE_ROLE

        public static final CollabNetRole HUDSON_CONFIGURE_ROLE
      • HUDSON_DELETE_ROLE

        public static final CollabNetRole HUDSON_DELETE_ROLE
    • Constructor Detail

      • CollabNetRoles

        public CollabNetRoles()
    • Method Detail

      • getMatchingRoles

        public static Collection<CollabNetRole> getMatchingRoles​(CTFList<CTFRole> userRoleSet)
        Get the applicable Jenkins roles matching a set of user role names
        Parameters:
        userRoleSet - names of roles to match
        Returns:
        a collection of Jenkins roles with names that exist in user role set
      • getNames

        public static List<String> getNames()
        Returns:
        an ordered List of Role names.
      • getGrantingRole

        public static CollabNetRole getGrantingRole​(Permission permission)
        Given a permission, return the CollabNet role which would grant that permission (if any). Returns the first permission granting role found (but we expect only one).
        Parameters:
        permission - Permission object
        Returns:
        the CollabNet role which would grant that permission, or null if none would.