mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
added path to permission
This commit is contained in:
@@ -3,11 +3,18 @@
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
import java.util.Collection;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.group.Group;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -72,19 +79,16 @@ public class HgPermissionBuilder
|
||||
name = createGroupString(name);
|
||||
}
|
||||
|
||||
if (permission.isReadable())
|
||||
if (!firstRead)
|
||||
{
|
||||
if (!firstRead)
|
||||
{
|
||||
read.append(", ");
|
||||
}
|
||||
else
|
||||
{
|
||||
firstRead = false;
|
||||
}
|
||||
|
||||
read.append(name);
|
||||
read.append(", ");
|
||||
}
|
||||
else
|
||||
{
|
||||
firstRead = false;
|
||||
}
|
||||
|
||||
read.append(name);
|
||||
|
||||
if (permission.isWriteable())
|
||||
{
|
||||
@@ -116,7 +120,8 @@ public class HgPermissionBuilder
|
||||
|
||||
result.append("__").append(name).append(", ");
|
||||
|
||||
Group group = /*SCMContext.getContext().getGroupManager().get(name);*/ null;
|
||||
Group group = /* SCMContext.getContext().getGroupManager().get(name); */
|
||||
null;
|
||||
|
||||
if (group != null)
|
||||
{
|
||||
|
||||
@@ -3,12 +3,19 @@
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import sonia.scm.util.Util;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -145,12 +152,12 @@ public class HgPermissionReader
|
||||
writePermissions.remove(readPerm);
|
||||
}
|
||||
|
||||
permissions.add(new Permission(readPerm, true, write, group));
|
||||
permissions.add(new Permission(readPerm, write, group));
|
||||
}
|
||||
|
||||
for (String writePerm : writePermissions)
|
||||
{
|
||||
permissions.add(new Permission(writePerm, false, true, group));
|
||||
permissions.add(new Permission(writePerm, true, group));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user