|
@ -195,54 +195,41 @@ class MumbleCtlIce_118(MumbleCtlBase): |
|
|
|
|
|
|
|
|
@protectDjangoErrPage |
|
|
@protectDjangoErrPage |
|
|
def getACL(self, srvid, channelid): |
|
|
def getACL(self, srvid, channelid): |
|
|
import Murmur |
|
|
|
|
|
acls = self._getIceServerObject(srvid).getACL(channelid) |
|
|
|
|
|
ret = [] |
|
|
|
|
|
for x in acls: |
|
|
|
|
|
if isinstance(x, list): |
|
|
|
|
|
tmp = [] |
|
|
|
|
|
for y in x: |
|
|
|
|
|
if y.__class__ is Murmur.ACL: |
|
|
|
|
|
tmp.append([y.applyHere, y.applySubs, y.inherited, y.playerid, self.setUnicodeFlag(y.group), y.allow, y.deny]) |
|
|
|
|
|
elif y.__class__ is Murmur.Group: |
|
|
|
|
|
tmp.append([self.setUnicodeFlag(y.name), y.inherited, y.inherit, y.inheritable, y.add, y.remove, y.members]) |
|
|
|
|
|
|
|
|
|
|
|
ret.append(tmp) |
|
|
|
|
|
else: |
|
|
|
|
|
ret.append(x) |
|
|
|
|
|
|
|
|
# need to convert acls to say "userid" instead of "playerid". meh. |
|
|
|
|
|
raw_acls, raw_groups, raw_inherit = self._getIceServerObject(srvid).getACL(channelid) |
|
|
|
|
|
|
|
|
return ret |
|
|
|
|
|
|
|
|
acls = [ ObjectInfo( |
|
|
|
|
|
applyHere = rule.applyHere, |
|
|
|
|
|
applySubs = rule.applySubs, |
|
|
|
|
|
inherited = rule.inherited, |
|
|
|
|
|
userid = rule.playerid, |
|
|
|
|
|
group = rule.group, |
|
|
|
|
|
allow = rule.allow, |
|
|
|
|
|
deny = rule.deny, |
|
|
|
|
|
) |
|
|
|
|
|
for rule in raw_acls |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
return acls, raw_groups, raw_inherit; |
|
|
|
|
|
|
|
|
@protectDjangoErrPage |
|
|
@protectDjangoErrPage |
|
|
def setACL(self, srvid, acl): |
|
|
|
|
|
|
|
|
def setACL(self, srvid, channelid, acls, groups, inherit): |
|
|
import Murmur |
|
|
import Murmur |
|
|
|
|
|
|
|
|
newacls = []; |
|
|
|
|
|
newgroups = []; |
|
|
|
|
|
|
|
|
|
|
|
for curr_acl in acl.acls: |
|
|
|
|
|
new_acl = Murmur.ACL(); |
|
|
|
|
|
new_acl.applyHere = curr_acl['applyHere']; |
|
|
|
|
|
new_acl.applySubs = curr_acl['applySubs']; |
|
|
|
|
|
new_acl.inherited = curr_acl['inherited']; |
|
|
|
|
|
new_acl.playerid = curr_acl['playerid']; |
|
|
|
|
|
new_acl.group = curr_acl['group'].encode( "UTF-8" ); |
|
|
|
|
|
new_acl.allow = curr_acl['allow']; |
|
|
|
|
|
new_acl.deny = curr_acl['deny']; |
|
|
|
|
|
newacls.append( new_acl ); |
|
|
|
|
|
|
|
|
|
|
|
for curr_group in acl.groups: |
|
|
|
|
|
new_group = Murmur.Group() |
|
|
|
|
|
new_group.name = curr_group['name'].encode( "UTF-8" ); |
|
|
|
|
|
new_group.inherited = curr_group['inherited']; |
|
|
|
|
|
new_group.inherit = curr_group['inherit']; |
|
|
|
|
|
new_group.inheritable = curr_group['inheritable']; |
|
|
|
|
|
new_group.add = curr_group['add']; |
|
|
|
|
|
new_group.remove = curr_group['remove']; |
|
|
|
|
|
new_group.members = curr_group['members']; |
|
|
|
|
|
newgroups.append( new_group ); |
|
|
|
|
|
|
|
|
|
|
|
self._getIceServerObject(srvid).setACL( acl.channelId, newacls, newgroups, acl.inherit ); |
|
|
|
|
|
|
|
|
ice_acls = []; |
|
|
|
|
|
|
|
|
|
|
|
for rule in acls: |
|
|
|
|
|
ice_rule = Murmur.ACL(); |
|
|
|
|
|
ice_rule.applyHere = rule.applyHere; |
|
|
|
|
|
ice_rule.applySubs = rule.applySubs; |
|
|
|
|
|
ice_rule.inherited = rule.inherited; |
|
|
|
|
|
ice_rule.playerid = rule.userid; |
|
|
|
|
|
ice_rule.group = rule.group; |
|
|
|
|
|
ice_rule.allow = rule.allow; |
|
|
|
|
|
ice_rule.deny = rule.deny; |
|
|
|
|
|
ice_acls.append(ice_rule); |
|
|
|
|
|
|
|
|
|
|
|
return self._getIceServerObject(srvid).setACL( channelid, ice_acls, groups, inherit ); |
|
|
|
|
|
|
|
|
@protectDjangoErrPage |
|
|
@protectDjangoErrPage |
|
|
def getTexture(self, srvid, mumbleid): |
|
|
def getTexture(self, srvid, mumbleid): |
|
@ -359,53 +346,9 @@ class MumbleCtlIce_120(MumbleCtlIce_118): |
|
|
|
|
|
|
|
|
@protectDjangoErrPage |
|
|
@protectDjangoErrPage |
|
|
def getACL(self, srvid, channelid): |
|
|
def getACL(self, srvid, channelid): |
|
|
import Murmur |
|
|
|
|
|
acls = self._getIceServerObject(srvid).getACL(channelid) |
|
|
|
|
|
ret = [] |
|
|
|
|
|
for x in acls: |
|
|
|
|
|
if isinstance(x, list): |
|
|
|
|
|
tmp = [] |
|
|
|
|
|
for y in x: |
|
|
|
|
|
if y.__class__ is Murmur.ACL: |
|
|
|
|
|
tmp.append([y.applyHere, y.applySubs, y.inherited, y.userid, self.setUnicodeFlag(y.group), y.allow, y.deny]) |
|
|
|
|
|
elif y.__class__ is Murmur.Group: |
|
|
|
|
|
tmp.append([self.setUnicodeFlag(y.name), y.inherited, y.inherit, y.inheritable, y.add, y.remove, y.members]) |
|
|
|
|
|
|
|
|
|
|
|
ret.append(tmp) |
|
|
|
|
|
else: |
|
|
|
|
|
ret.append(x) |
|
|
|
|
|
|
|
|
|
|
|
return ret |
|
|
|
|
|
|
|
|
return self._getIceServerObject(srvid).getACL(channelid) |
|
|
|
|
|
|
|
|
@protectDjangoErrPage |
|
|
@protectDjangoErrPage |
|
|
def setACL(self, srvid, acl): |
|
|
|
|
|
import Murmur |
|
|
|
|
|
|
|
|
|
|
|
newacls = []; |
|
|
|
|
|
newgroups = []; |
|
|
|
|
|
|
|
|
|
|
|
for curr_acl in acl.acls: |
|
|
|
|
|
new_acl = Murmur.ACL(); |
|
|
|
|
|
new_acl.applyHere = curr_acl['applyHere']; |
|
|
|
|
|
new_acl.applySubs = curr_acl['applySubs']; |
|
|
|
|
|
new_acl.inherited = curr_acl['inherited']; |
|
|
|
|
|
new_acl.userid = curr_acl['playerid']; |
|
|
|
|
|
new_acl.group = curr_acl['group'].encode( "UTF-8" ); |
|
|
|
|
|
new_acl.allow = curr_acl['allow']; |
|
|
|
|
|
new_acl.deny = curr_acl['deny']; |
|
|
|
|
|
newacls.append( new_acl ); |
|
|
|
|
|
|
|
|
|
|
|
for curr_group in acl.groups: |
|
|
|
|
|
new_group = Murmur.Group() |
|
|
|
|
|
new_group.name = curr_group['name'].encode( "UTF-8" ); |
|
|
|
|
|
new_group.inherited = curr_group['inherited']; |
|
|
|
|
|
new_group.inherit = curr_group['inherit']; |
|
|
|
|
|
new_group.inheritable = curr_group['inheritable']; |
|
|
|
|
|
new_group.add = curr_group['add']; |
|
|
|
|
|
new_group.remove = curr_group['remove']; |
|
|
|
|
|
new_group.members = curr_group['members']; |
|
|
|
|
|
newgroups.append( new_group ); |
|
|
|
|
|
|
|
|
|
|
|
self._getIceServerObject(srvid).setACL( acl.channelId, newacls, newgroups, acl.inherit ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setACL(self, srvid, channelid, acls, groups, inherit): |
|
|
|
|
|
return self._getIceServerObject(srvid).setACL( channelid, acls, groups, inherit ); |
|
|
|
|
|
|