Class CNAuthorizationStrategy

    • Constructor Detail

      • CNAuthorizationStrategy

        public CNAuthorizationStrategy​(List<String> readUsers,
                                       List<String> readGroups,
                                       List<String> adminUsers,
                                       List<String> adminGroups,
                                       int permCacheTimeoutMin)
        Constructs a new CNAUthorizationStrategy object. This AuthorizationStrategy depends upon the CNAuthentication SecurityRealm.
        Parameters:
        readUsers - a list of usernames (from CollabNet) that has system-wide read.
        readGroups - a list of groupnames (from CollabNet) whose members have system-wide read.
        adminUsers - a list of usernames (from CollabNet) that have all permissions in Jenkins.
        adminGroups - a list of groupnames (from CollabNet) whose members have all permissions in Jenkins.
        permCacheTimeoutMin - the cache timeout in min, after which the cache entries are cleared. -1 to disable.
      • CNAuthorizationStrategy

        @DataBoundConstructor
        public CNAuthorizationStrategy​(String readUsersStr,
                                       String readGroupsStr,
                                       String adminUsersStr,
                                       String adminGroupsStr,
                                       int authCacheTimeoutMin)
    • Method Detail

      • getReadUsersStr

        public String getReadUsersStr()
        Returns:
        a comma-delimited string of the read-only users.
      • getReadGroupsStr

        public String getReadGroupsStr()
        Returns:
        a comma-delimited string of the read-only groups.
      • getAdminUsersStr

        public String getAdminUsersStr()
        Returns:
        a comma-delimited string of the admin users.
      • getAdminGroupsStr

        public String getAdminGroupsStr()
        Returns:
        a comma-delimited string of the admin groups.
      • getAuthCacheTimeoutMin

        public int getAuthCacheTimeoutMin()
        Get the number of min the cache is to be kept.
        Returns:
        number of min
      • getAuthCacheTimeoutMs

        public long getAuthCacheTimeoutMs()
        Get the number of ms the cache is to be kept.
        Returns:
        number of ms
      • getACL

        public ACL getACL​(Job<?,​?> job)
        Overrides:
        getACL in class AuthorizationStrategy
        Returns:
        the ACL specific to the CSFE project, if available. Otherwise, return the root ACL.