Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用 Liferay 6.1.1,并且正在为默认值编写一个钩子。
我拼命寻找一种通过 API 将 userGroup 分配给角色的方法。
有人可以帮忙吗?
我没试过,但你能做这样的事情吗
//Get group from UserGroup Group group = userGroup.getGroup(); //Assign it to the role GroupLocalServiceUtil.addRoleGroups(roleId, new long[]{group.getGroupId()});