I know I can give permissions in
${host}:4502/useradmin
when I double click user login and go to Permissions
tab
I want to give permissions when I deploy content package.
Is it possible?
You need to declare the permissions in the manifest file first before you request for them programmatically. refer this for more information. declaring the permission in the manifest file is static type declaration by which your os know what kind of permission your app might require.
Requesting Android Runtime Permissions For this the following method needs to be called on every permission. checkSelfPermission(String perm); It returns an integer value of PERMISSION_GRANTED or PERMISSION_DENIED.
When you give permission for a user for a particular node/path , it basically stores the permission on the node level below the rep:policy node (allow/deny).
I want to give permissions when I deploy content package.
You can refer to ACL packager from ACS Tools for packaging ACLs.
Note : The user who is installing the package needs to have permission to set ACLs
To programmatically set ACLs (as the title of your question says), you might care to check out few Jackrabbit/JCR interfaces/classes .
org.apache.jackrabbit.api.security.JackrabbitAccessControlManager
org.apache.jackrabbit.api.security.JackrabbitAccessControlList
javax.jcr.security.Privilege
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With