update
This commit is contained in:
@@ -913,7 +913,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
|
||||
|
||||
@Override
|
||||
public ErrorCode transferGroup(String operator, String groupId, String newOwner) {
|
||||
public ErrorCode transferGroup(String operator, String groupId, String newOwner, boolean isAdmin) {
|
||||
HazelcastInstance hzInstance = m_Server.getHazelcastInstance();
|
||||
IMap<String, WFCMessage.GroupInfo> mIMap = hzInstance.getMap(GROUPS_MAP);
|
||||
|
||||
@@ -924,7 +924,7 @@ public class MemoryMessagesStore implements IMessagesStore {
|
||||
return ErrorCode.ERROR_CODE_NOT_EXIST;
|
||||
}
|
||||
|
||||
if ((groupInfo.getType() == ProtoConstants.GroupType.GroupType_Restricted || groupInfo.getType() == ProtoConstants.GroupType.GroupType_Normal)
|
||||
if (!isAdmin && (groupInfo.getType() == ProtoConstants.GroupType.GroupType_Restricted || groupInfo.getType() == ProtoConstants.GroupType.GroupType_Normal)
|
||||
&& (groupInfo.getOwner() == null || !groupInfo.getOwner().equals(operator))) {
|
||||
return ErrorCode.ERROR_CODE_NOT_RIGHT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user