Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the Map with ModeshapePermissions to WebAC access modes. #19

Merged
merged 8 commits into from Sep 4, 2015

Conversation

mohideen
Copy link
Contributor

@mohideen mohideen commented Sep 3, 2015

The actions String Array in the hasPermission method is defined by the AuthorizationProvider: https://docs.jboss.org/author/display/MODE/Custom+authentication+providers

The actions are explained in the javadoc: http://docs.jboss.org/modeshape/4.2.0.Final/api/org/modeshape/jcr/ModeShapePermissions.html

@mohideen
Copy link
Contributor Author

mohideen commented Sep 3, 2015

I am not sure if these modeshape permissions map to a webac access mode:
ModeShapePermissions.ALL_CHANGE_PERMISSIONS
ModeShapePermissions.ALL_PERMISSIONS
ModeShapePermissions.BACKUP
ModeShapePermissions.INDEX_WORKSPACE
ModeShapePermissions.MONITOR
ModeShapePermissions.READONLY_EXTERNAL_PATH_PERMISSIONS
ModeShapePermissions.UNLOCK_ANY

@@ -38,6 +38,8 @@
import org.fcrepo.auth.roles.common.AbstractRolesAuthorizationDelegate;
import org.fcrepo.auth.roles.common.AccessRolesProvider;
import org.fcrepo.kernel.api.services.NodeService;

import org.modeshape.jcr.ModeShapePermissions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, do we need a FedoraPermissions interface that inherits the ModeshapePermissions, instead of directly using it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way you are thinking, @mohideen.

@acoburn
Copy link
Contributor

acoburn commented Sep 4, 2015

@mohideen can you rebase this PR. Also, I agree with @whikloj about excluding CREATE_WORKSPACE, DELETE_WORKSPACE and RESTORE. I think, however, that REGISTER_TYPE and REGISTER_NAMESPACE may be appropriate to keep. Thoughts @awoods?

Also, I didn't see ADD_NODE, which seems appropriate to include. The full list of actions is here: http://docs.jboss.org/modeshape/4.2.0.Final/api/org/modeshape/jcr/ModeShapePermissions.html

@awoods
Copy link
Member

awoods commented Sep 4, 2015

REGISTER_NAMESPACE seems like an expected action. I believe we limit REGISTER_TYPE to just CND configuration, in which case it should be safe to omit.

@whikloj
Copy link
Member

whikloj commented Sep 4, 2015

+1 to @acoburn for ADD_NODE

@whikloj
Copy link
Member

whikloj commented Sep 4, 2015

So to recap we remove

REGISTER_TYPE
CREATE_WORKSPACE
DELETE_WORKSPACE
RESTORE

and we add
ADD_NODE

the rest is fine.

Conflicts:
	src/main/java/org/fcrepo/auth/webac/WebACAuthorizationDelegate.java
	src/main/java/org/fcrepo/auth/webac/impl/WebACAccessRolesProvider.java
	src/test/java/org/fcrepo/auth/webac/impl/WebACAccessRolesProviderTest.java
REGISTER_TYPE
CREATE_WORKSPACE
DELETE_WORKSPACE
RESTORE

Added:
ADD_NODE
@mohideen mohideen closed this Sep 4, 2015
@mohideen mohideen deleted the delegate_impl branch September 4, 2015 15:32
@awoods awoods reopened this Sep 4, 2015
acoburn added a commit that referenced this pull request Sep 4, 2015
Updated the Map with ModeshapePermissions to WebAC access modes.
@acoburn acoburn merged commit 4b4eba0 into fcrepo4:delegate_impl Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants