Commits

Sebastian Sdorra committed b98d1f2

added group for all authenticated users

Comments (0)

Files changed (2)

scm-core/src/main/java/sonia/scm/group/GroupNames.java

  */
 
 
+
 package sonia.scm.group;
 
 //~--- non-JDK imports --------------------------------------------------------
 public final class GroupNames implements Serializable, Iterable<String>
 {
 
+  /**
+   * Group for all authenticated users
+   * @since 1.31
+   */
+  public static final String AUTHENTICATED = "_authenticated";
+
   /** Field description */
   private static final long serialVersionUID = 8615685985213897947L;
 

scm-webapp/src/main/java/sonia/scm/security/ScmRealm.java

 import sonia.scm.repository.Repository;
 import sonia.scm.repository.RepositoryDAO;
 import sonia.scm.repository.RepositoryEvent;
+import sonia.scm.repository.RepositoryManager;
 import sonia.scm.user.User;
 import sonia.scm.user.UserDAO;
 import sonia.scm.user.UserEvent;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import sonia.scm.repository.RepositoryManager;
 
 /**
  *
    * @param repositoryDAO
    * @param userDAO
    * @param authenticator
+   * @param manager
    * @param requestProvider
    * @param responseProvider
    */
   public ScmRealm(ScmConfiguration configuration, CacheManager cacheManager,
     UserManager userManager, GroupManager groupManager,
     RepositoryDAO repositoryDAO, UserDAO userDAO,
-    AuthenticationManager authenticator,
-    RepositoryManager manager,
+    AuthenticationManager authenticator, RepositoryManager manager,
     Provider<HttpServletRequest> requestProvider,
     Provider<HttpServletResponse> responseProvider)
   {
   {
     Set<String> groupSet = Sets.newHashSet();
 
+    // add group for all authenticated users
+    groupSet.add(GroupNames.AUTHENTICATED);
+
     // load external groups
     Collection<String> extGroups = ar.getGroups();