diff --git a/src/org/labkey/snd/SNDModule.java b/src/org/labkey/snd/SNDModule.java index 9c3efabb..920165bc 100644 --- a/src/org/labkey/snd/SNDModule.java +++ b/src/org/labkey/snd/SNDModule.java @@ -42,11 +42,13 @@ import org.labkey.snd.security.roles.SNDBasicSubmitterRole; import org.labkey.snd.security.roles.SNDDataAdminRole; import org.labkey.snd.security.roles.SNDDataReviewerRole; +import org.labkey.snd.security.roles.SNDEditorRole; import org.labkey.snd.security.roles.SNDPackageEditorRole; import org.labkey.snd.security.roles.SNDPackageViewerRole; import org.labkey.snd.security.roles.SNDProjectEditorRole; import org.labkey.snd.security.roles.SNDProjectViewerRole; import org.labkey.snd.security.roles.SNDReaderRole; +import org.labkey.snd.security.roles.SNDViewerRole; import java.util.Collection; import java.util.Collections; @@ -97,6 +99,8 @@ protected void init() RoleManager.registerRole(new SNDPackageEditorRole(), true); RoleManager.registerRole(new SNDProjectViewerRole(), true); RoleManager.registerRole(new SNDProjectEditorRole(), true); + RoleManager.registerRole(new SNDViewerRole(), true); + RoleManager.registerRole(new SNDEditorRole(), true); } diff --git a/src/org/labkey/snd/security/permissions/SNDEditorPermission.java b/src/org/labkey/snd/security/permissions/SNDEditorPermission.java new file mode 100644 index 00000000..14af6fdf --- /dev/null +++ b/src/org/labkey/snd/security/permissions/SNDEditorPermission.java @@ -0,0 +1,16 @@ +package org.labkey.snd.security.permissions; + +import org.labkey.api.security.permissions.AbstractPermission; + + +/** + * Created by thawkins on 8/6/2024. + */ +public class SNDEditorPermission extends AbstractPermission +{ + public SNDEditorPermission() + { + super("SNDEditorPermission", "This is the base permission required to Edit SND Data."); + } + +} diff --git a/src/org/labkey/snd/security/permissions/SNDViewerPermission.java b/src/org/labkey/snd/security/permissions/SNDViewerPermission.java new file mode 100644 index 00000000..d5ab0cc0 --- /dev/null +++ b/src/org/labkey/snd/security/permissions/SNDViewerPermission.java @@ -0,0 +1,16 @@ +package org.labkey.snd.security.permissions; + +import org.labkey.api.security.permissions.AbstractPermission; + + +/** + * Created by thawkins on 8/6/2024. + */ +public class SNDViewerPermission extends AbstractPermission +{ + public SNDViewerPermission() + { + super("SNDViewerPermission", "This is the base permission required to view SND Data."); + } + +} \ No newline at end of file diff --git a/src/org/labkey/snd/security/roles/SNDEditorRole.java b/src/org/labkey/snd/security/roles/SNDEditorRole.java new file mode 100644 index 00000000..442540f4 --- /dev/null +++ b/src/org/labkey/snd/security/roles/SNDEditorRole.java @@ -0,0 +1,23 @@ +package org.labkey.snd.security.roles; + +import org.labkey.api.security.roles.AbstractModuleScopedRole; +import org.labkey.snd.SNDModule; +import org.labkey.snd.security.permissions.SNDEditorPermission; +import org.labkey.snd.security.permissions.SNDViewerPermission; + +/** + * Created by thawkins on 8/6/2024. + */ +public class SNDEditorRole extends AbstractModuleScopedRole +{ + public SNDEditorRole() + { + super("SND Data Editors", "Users with this role are permitted to Edit SND data.", + SNDModule.class, + SNDViewerPermission.class, + SNDEditorPermission.class + ); + + + } +} \ No newline at end of file diff --git a/src/org/labkey/snd/security/roles/SNDViewerRole.java b/src/org/labkey/snd/security/roles/SNDViewerRole.java new file mode 100644 index 00000000..caf54d88 --- /dev/null +++ b/src/org/labkey/snd/security/roles/SNDViewerRole.java @@ -0,0 +1,21 @@ +package org.labkey.snd.security.roles; + +import org.labkey.api.security.roles.AbstractModuleScopedRole; +import org.labkey.snd.SNDModule; +import org.labkey.snd.security.permissions.SNDViewerPermission; + +/** + * Created by thawkins on 8/6/2024. + */ +public class SNDViewerRole extends AbstractModuleScopedRole +{ + public SNDViewerRole() + { + super("SND Data Viewers", "Users with this role are permitted to view SND data.", + SNDModule.class, + SNDViewerPermission.class + ); + + + } +} \ No newline at end of file