SecurityGroup anonymousGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ANONYMOUS);
boolean hasBeenAnonymous = secMgr.isIdentityInSecurityGroup(myIdentity, anonymousGroup);
isAnonymous = form.isAnonymous();
updateSecurityGroup(myIdentity, secMgr, anonymousGroup, hasBeenAnonymous, isAnonymous);
// system users - oposite of anonymous users
SecurityGroup usersGroup = secMgr.findSecurityGroupByName(Constants.GROUP_OLATUSERS);
boolean hasBeenUser = secMgr.isIdentityInSecurityGroup(myIdentity, usersGroup);
boolean isUser = !form.isAnonymous();
updateSecurityGroup(myIdentity, secMgr, usersGroup, hasBeenUser, isUser);
}
// 2) system roles