on 11-09-2004 10:15 AM
Hi all
i am trying to create acl for a collection.
i am looking for example to start with.
thanks in advance
regards
rami
Please could you specify what you would like to do with the ACL:s to the collection e.g. set owner, change permission ? Should the collection support inheritance (inherent the ACL:s / permission of the parent Collection?)
Best regards
Raz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you check out the KM javadocs on this subject?
The classes handling ACL stuff are com.sapportals.wcm.util.acl.IACLManager and others in this package. You'll get an ACLManager either from the ACLManagerFactory or (AFAIK) from the repositoryManager of your resource/collection.
Regards,
Armin
Hi Yuri,
just a snapshot from some project:
IResourceAclManager aclMan = ((IAclSecurityManager)
collection.getRepositoryManager().getSecurityManager(collection)).getAclManager();
IResourceAcl acl = aclMan.getAcl(collection);
if (acl == null) {
acl = aclMan.createAcl(collection);
}
[...]
Hope it helps
Detlev
Hi Detlev,
It helps a lot. Thank you.
But then I have to add an IAclEntry to the IResourceAcl
instance, right? And to create that entry I have to use
createAclEntry method of IResourceAclManager class, which
requires parameter of type IUMPrincipal. What jar file
contains that class and how do I assign this paramenter
to any group/user?
Thanks again,
Yuri
Hi Yuri,
> then I have to add an IAclEntry
> to the IResourceAcl instance, right?
Right.
> to create that entry I have to use
> createAclEntry method of IResourceAclManager class
Right.
> which requires parameter of type IUMPrincipal
Of course. IUMPricipal is the super interface for all kinds of principals - users, groups, roles; it's only a pity that this is the old EP5 UM classes, but look here for transformation help:
The whole API is very close to the UserInterface. If you have this in mind, it is very, very intuitive (the whole KM API is very intuitive, indeed; what cannot be said for a thousand other API parts within the rest of the portal).
> What jar file contains that class
Hm-mmm. Ok, for the 999th time
Take a screwdriver, open your computer, open your hard disk, open your eyes, take every jar from the hard disk, open it with the JarScrewDriver and look inside. Take care to put all things together as you have found them for getting your machine running again!
OK, it was a joke
Instead, take WinRAR or JARFinder or the tool in which you believe most for searching on a hard disk within JARs, and LOOK OUT
And: If you would have opened another thread for this, being able to reward points, I would have searched this time for you... but in this case... You will have to search... I will get a cup of coffee...
Best regards
Detlev
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.