Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Get workgroups privilege
gomes
I need to get a workgroup privilege in the worksite mp.Privilege means not in the library manager, i need the privilege which will be set in the workgroup. for example
"Send broadcast messages : Grant Revoke Not Granted"
"Create projects and WorkSpace root content : Grant Revoke Not Granted"
"Assign tasks : Grant Revoke Granted"
How to get the method name and from which object we can get the privilege settings..
its very urgent.. Advance thanks...
Find more posts tagged with
Comments
Migrateduser
Please see the "WOM Developer Guides.pdf" page 132.
And here are some sample codes from the above doc :
============================================
Workgroup workgroup = workspace.createWorkgroup();
workgroup.setName("SampleWorkgroup");
workgroup.update();
workgroup.refresh();
workgroup.addMember(user);
PrivilegeSetting ps = workgroup.getPrivilegeSetting();
// Grant privilege
Collection allAssignments =
ps.getAllPrivilegeAssignments();
for(Iterator myIter = allAssignments.iterator();
myIter.hasNext()
{
PrivilegeAssignment pa =
(PrivilegeAssignment)myIter.next();
if(!pa.getPrivilege().isLibraryPrivilege_b())
{ pa.addPrivilegeGrant(); }
}
ps.setAllPrivilegeAssignments(allAssignments);
ps.update();
// Print all privileges from the library
Collection allPrivileges = library.getAllPrivileges();
Privilege priv;
for(Iterator myIter = allPrivileges.iterator();
myIter.hasNext();
System.out.println
("Parameter : " + priv.getDescription()))
{
priv = (Privilege)myIter.next();
System.out.println("Name : " + priv.getName());
}
=========================================