cancel
Showing results for 
Search instead for 
Did you mean: 

Add group (Authority) throwing error

mangar
Star Contributor
Star Contributor
I am using the AccessControllService to add a group like this:


       NewAuthority cpGrpAuth = new NewAuthority("GROUP", groupName);
       NewAuthority[] newAuthorities = {cpGrpAuth};
        session.getAccessControlService().createAuthorities(null, newAuthorities);


everything works fine when I initialize the session with the admin user.  However,  when I use a user that does not a permission to create a group, I get a massive amount of axis [DEBUG] statements the most alarming is this:


[DEBUG] org.apache.ws.security.util.Loader.loadClass: org.bouncycastle.jce.provider.BouncyCastleProvider
java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider


I have spent a very frustrating evening figuring out what went wrong, namely, I thought I had a jar conflict or something.

Shouldn't I just have gotten a NotAuthorized Exception or something more helpful.

Is this a bug?  What should I do, is this something I should put in JIRA, or just accept as my own dumb fault.  (Which I am more than willing to accept) Smiley Happy
3 REPLIES 3

kaynezhang
World-Class Innovator
World-Class Innovator
Which version are you using ?
I'm using alfresco 4.2 when   I  create a group using a user that does not a permission to create .I got following exceptions

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.alfresco.repo.security.permissions.AccessDeniedException: 02010025
faultActor:
faultNode:
faultDetail:

Community 4.2.e

kaynezhang
World-Class Innovator
World-Class Innovator
I just rechecked alfresco version that I'm using ,it is 4.3.0.
When I create a group using a user by calling AccessControllService  that does not have permission to create,it throws exception that I pasted before.
So it might be a bug of your version ,you can  upgrade it to 4.3 and try it again.