Skip to content

Commit

Permalink
[?] Add support for new permission levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Dec 1, 2023
1 parent 66bc3a8 commit 52edb9b
Showing 1 changed file with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,38 @@ public static FilePermissionEnum enumValueFromSpecificQueryTextPermission(final
return OWN;
}

if (textPermission.equals("read")) {
if (textPermission.equals("read") || textPermission.equals("read object")
|| textPermission.equals("read_object")) {
return READ;
}

if (textPermission.equals("read object")) {
return READ;
if (textPermission.equals("write") || textPermission.equals("modify object")
|| textPermission.equals("modify_object")) {
return WRITE;
}

if (textPermission.equals("write")) {
return WRITE;
if (textPermission.equals("create_metadata")) {
return CREATE_METADATA;
}

if (textPermission.equals("modify object")) {
return WRITE;
if (textPermission.equals("modify_metadata")) {
return MODIFY_METADATA;
}

if (textPermission.equals("delete_metadata")) {
return DELETE_METADATA;
}

if (textPermission.equals("create_object")) {
return CREATE_OBJECT;
}

if (textPermission.equals("delete_object")) {
return DELETE_OBJECT;
}

if (textPermission.equals("null")) {
return NULL;
}

if (textPermission.equals("none")) {
Expand Down

0 comments on commit 52edb9b

Please sign in to comment.