rename User to Viewer

This commit is contained in:
amentis 2024-05-22 17:45:01 +03:00
parent d50b6b307a
commit b9b3fb3e78
4 changed files with 8 additions and 12 deletions

View File

@ -8,7 +8,7 @@ import java.util.Map;
public enum DmpUserRole implements DatabaseEnum<Short> {
Owner((short) 0),
User((short) 1),
Viewer((short) 1),
DescriptionContributor((short) 2),
Reviewer((short) 3);

View File

@ -59,7 +59,7 @@ public class DmpUserCommonModelBuilder extends BaseCommonModelBuilder<DmpUserMod
for (DmpUserEntity d : data) {
DmpUserModel m = new DmpUserModel();
switch (d.getRole()){
case User -> m.setRole(DmpUserRole.User);
case Viewer -> m.setRole(DmpUserRole.Viewer);
case Owner -> m.setRole(DmpUserRole.Owner);
case DescriptionContributor -> m.setRole(DmpUserRole.DescriptionContributor);
case Reviewer -> m.setRole(DmpUserRole.Reviewer);

View File

@ -2032,7 +2032,7 @@ public class DmpServiceImpl implements DmpService {
switch (model.getRole()){
case Owner -> persist.setRole(DmpUserRole.Owner);
case User -> persist.setRole(DmpUserRole.User);
case Viewer -> persist.setRole(DmpUserRole.Viewer);
case DescriptionContributor -> persist.setRole(DmpUserRole.DescriptionContributor);
case Reviewer -> persist.setRole(DmpUserRole.Reviewer);
default -> throw new MyApplicationException("Unrecognized Type " + model.getRole().getValue());

View File

@ -173,7 +173,7 @@ permissions:
dmp:
roles:
- Owner
- User
- Viewer
- DescriptionContributor
- Reviewer
clients: [ ]
@ -185,7 +185,6 @@ permissions:
dmp:
roles:
- Owner
- User
- DescriptionContributor
- Reviewer
clients: [ ]
@ -292,7 +291,7 @@ permissions:
dmp:
roles:
- Owner
- User
- Viewer
- DescriptionContributor
- Reviewer
claims: [ ]
@ -408,7 +407,7 @@ permissions:
dmp:
roles:
- Owner
- User
- Viewer
- DescriptionContributor
- Reviewer
clients: [ ]
@ -420,9 +419,6 @@ permissions:
dmp:
roles:
- Owner
- User
- DescriptionContributor
- Reviewer
clients: [ ]
allowAnonymous: false
allowAuthenticated: false
@ -840,7 +836,7 @@ permissions:
dmp:
roles:
- Owner
- User
- Viewer
- DescriptionContributor
- Reviewer
clients: [ ]
@ -852,7 +848,7 @@ permissions:
dmp:
roles:
- Owner
- User
- Viewer
- DescriptionContributor
- Reviewer
claims: [ ]