掲示板
Organization Administrator
12年前 に mehmet tasar によって更新されました。
Organization Administrator
Junior Member 投稿: 49 参加年月日: 11/03/06 最新の投稿
Hello everyone,
How can i get all Organization Administrator of one organization.
Which method should I use?
thanks.
How can i get all Organization Administrator of one organization.
Which method should I use?
thanks.
If you are looking for all users with a given role within a given community:
you can make use of Utility methods also,
Remember that the methods in the classes XXXLocalServiceUtil are not checking the permissions of the current user.
Thanks,
Mayur
long companyId= _X_; //Perhaps CompanyThreadLocal.getCompanyId() if you don't have it anywhere else?
Role role=RoleLocalServiceUtil.getRole(companyId, "Example Role");
Group group=GroupLocalServiceUtil.getGroup(companyId, "Example Community");
List<usergrouprole> userGroupRoles = UserGroupRoleLocalServiceUtil.
getUserGroupRolesByGroupAndRole(groupId, role.getRoleId());
for(UserGroupRole userGroupRole:userGroupRoles){
User oneUser=userGroupRole.getUser();
}</usergrouprole>
you can make use of Utility methods also,
Role role=RoleLocalServiceUtil.getRole(companyId,[b]RoleConstants.ORGANIZATION_ADMINISTRATOR[/b]);
List<user> UserLocalServiceUtil.getRoleUsers(role.getRoleId())</user>
Remember that the methods in the classes XXXLocalServiceUtil are not checking the permissions of the current user.
Thanks,
Mayur
12年前 に mehmet tasar によって更新されました。
RE: Organization Administrator
Junior Member 投稿: 49 参加年月日: 11/03/06 最新の投稿
thank you Mayur.