Adding A Portal Role Programatically
IUser user = WDClientUser.getCurrentUser().getSAPUser();
IRole role =  UMFactory.getRoleFactory().getRoleByUniqueName(
                    "pcd:portal_content/administrator/super_admin/super_admin_role");
IRole mRole =
            UMFactory.getRoleFactory().getMutableRole(role.getUniqueID());
            mRole.addUserMember(user.getUniqueID());
            mRole.commit();
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License