mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
#8771 Permission endpoints
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package sonia.scm.repository;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
public class PermissionAlreadyExistsException extends RepositoryException {
|
||||
|
||||
public PermissionAlreadyExistsException(Repository repository, String permissionName) {
|
||||
super(MessageFormat.format("the permission {0} of the repository {1}/{2} is already exists", permissionName, repository.getNamespace(), repository.getName()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package sonia.scm.repository;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
public class PermissionNotFoundException extends RepositoryException{
|
||||
|
||||
|
||||
public PermissionNotFoundException(Repository repository, String permissionName) {
|
||||
super(MessageFormat.format("the permission {0} of the repository {1}/{2} does not exists", permissionName,repository.getNamespace(), repository.getName() ));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ public class VndMediaType {
|
||||
public static final String USER = PREFIX + "user" + SUFFIX;
|
||||
public static final String GROUP = PREFIX + "group" + SUFFIX;
|
||||
public static final String REPOSITORY = PREFIX + "repository" + SUFFIX;
|
||||
public static final String PERMISSION = PREFIX + "permission" + SUFFIX;
|
||||
public static final String BRANCH = PREFIX + "branch" + SUFFIX;
|
||||
public static final String USER_COLLECTION = PREFIX + "userCollection" + SUFFIX;
|
||||
public static final String GROUP_COLLECTION = PREFIX + "groupCollection" + SUFFIX;
|
||||
|
||||
Reference in New Issue
Block a user