Fixed required role to create/update Profile
This commit is contained in:
parent
bcd6ee9bbe
commit
e2763d6804
|
@ -1,6 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//src/main/java=UTF-8
|
encoding//src/main/java=UTF-8
|
||||||
encoding//src/main/resources=UTF-8
|
|
||||||
encoding//src/test/java=UTF-8
|
encoding//src/test/java=UTF-8
|
||||||
encoding//src/test/resources=UTF-8
|
encoding//src/test/resources=UTF-8
|
||||||
encoding/<project>=UTF-8
|
encoding/<project>=UTF-8
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class ISProfile {
|
||||||
public boolean createOrUpdate(String name, String xml) throws SAXException {
|
public boolean createOrUpdate(String name, String xml) throws SAXException {
|
||||||
try {
|
try {
|
||||||
CKANUser ckanUser = CKANUserCache.getCurrrentCKANUser();
|
CKANUser ckanUser = CKANUserCache.getCurrrentCKANUser();
|
||||||
if(ckanUser.getRole().ordinal()<Role.ADMIN.ordinal()) {
|
if(ckanUser.getRole().ordinal()<Role.EDITOR.ordinal()) {
|
||||||
throw new NotAuthorizedException("You are not authorized to manage profiles, only Catalogue Editor can manipulate profiles.");
|
throw new NotAuthorizedException("You are not authorized to manage profiles, only Catalogue Editor can manipulate profiles.");
|
||||||
}
|
}
|
||||||
MetadataUtility metadataUtility = new MetadataUtility();
|
MetadataUtility metadataUtility = new MetadataUtility();
|
||||||
|
|
Loading…
Reference in New Issue