You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2018/01/25 21:08:00 UTC
[jira] [Comment Edited] (SLING-7227) Repo Init: Add ability to
register custom privileges
[ https://issues.apache.org/jira/browse/SLING-7227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340083#comment-16340083 ]
Karl Pauls edited comment on SLING-7227 at 1/25/18 9:07 PM:
------------------------------------------------------------
[~bdelacretaz], I think I got the main part done (both, parser and jcr module). The main idea for a syntax is:
{noformat}
register privilege MyPriv as abstract with AggPriv1,AggPriv2
{noformat}
Obviously, "as abstract" and "with foo,bar" is optional i.e., you could as well have:
{noformat}
register privilege MyPriv with AggPriv1,AggPriv2
{noformat}
to make it not abstract or even just:
{noformat}
register privilege MyPriv
{noformat}
Please have a look at the two PR's and let me know what you think.
was (Author: karlpauls):
[~bdelacretaz], I think I got the main part done (both, parser and jcr module). The main idea for a syntax is:
{noformat}
register privilege MyPriv as abstract with AggPriv1,AggPriv2
{noformat}
Please have a look at the two PR's and let me know what you think.
> Repo Init: Add ability to register custom privileges
> ----------------------------------------------------
>
> Key: SLING-7227
> URL: https://issues.apache.org/jira/browse/SLING-7227
> Project: Sling
> Issue Type: Improvement
> Components: Repoinit
> Reporter: angela
> Assignee: Karl Pauls
> Priority: Major
> Fix For: Repoinit Parser 1.2.2, Repoinit JCR 1.1.8
>
>
> [~marett], [~bdelacretaz], looking at the repo-init source I couldn't find a way to register a custom privilege during repo init. I am sure this is an oversight and hasn't been omitted intentionally.
> The corresponding API calls are:
> {code}
> JackrabbitWorkspace.getPrivilegeManager()
> PrivilegeManager.registerPrivilege(String privilegeName, boolean isAbstract, String[] declaredAggregateNames)
> {code}
> See also
> http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/JackrabbitWorkspace.java?view=markup
> http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authorization/PrivilegeManager.java?view=markup
> I would be appreciate if the repo init could have this gap filled. Thanks.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)