cancel
Showing results for 
Search instead for 
Did you mean: 

AuthorityService: problem removing an authority group

sergio
Champ in-the-making
Champ in-the-making
Hi.

It is not totally clear to me how to create and delete a GROUP (authority group) using the AuthorityService Java class.

Creating a GROUP using the createAuthority(AuthorityType.GROUP,parentGroupName,groupName) method works: a new GROUP is created and visibile into Alfresco.

Deleting a GROUP using the deleteAuthority(groupName) seems not to work as I thought. The group previously created using the createAuthority() method still remains in the repository as is visibile in the web administration console. Why? Maybe the procedure of deleting a GROUP is different and more complex?

Taking a look at another prevoius post
http://forums.alfresco.com/viewtopic.php?t=8327&highlight=authorityservice+deleteauthority

Andy says that "The authority is deleted via the node serivce", but what does it mean exactly? Should I delete a GROUP authority using the nodeService instead of the authorityService?

Some clarification will be very appreciated.

All the best,

Sergio
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

You should delete the group as described. You need to use the full name of the group - prefixed with GROUP.
Take a look at the tests.

Andy

sergio
Champ in-the-making
Champ in-the-making
Ok Andy, thanks.

Done. It works. Now I have a problem with users, but this will be another story (and post).

See you soon.