Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, Zenoss Inc. 5 # 6 # This program is free software; you can redistribute it and/or modify it 7 # under the terms of the GNU General Public License version 2 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 from Products.ZenRelations.RelSchema import * 15 from ZenModelRM import ZenModelRM 16 from ZenossSecurity import * 17 1820 21 meta_type = "AdministrativeRole" 22 23 _relations = ( 24 ("userSetting", ToOne(ToMany, "Products.ZenModel.UserSettings", "adminRoles")), 25 ("managedObject", ToOne(ToManyCont, "Products.ZenModel.AdministrativeRoleable", "adminRoles")), 26 ) 27 28 level = 1 29 role = ZEN_USER_ROLE 3082 83 DeviceAdministrativeRole = AdministrativeRole 84 DevOrgAdministrativeRole = AdministrativeRole 8532 userid = userSettings.getId() 33 ZenModelRM.__init__(self, userid) 34 self.role = userSettings.defaultAdminRole 35 self.level = userSettings.defaultAdminLevel 36 self.id = userid 37 managedObject = managedObject.primaryAq() 38 managedObject.adminRoles._setObject(userid, self) 39 self.userSetting.addRelation(userSettings) 40 managedObject.manage_setLocalRoles(userid, (self.role,),) 41 managedObject.index_object()42 4345 self.role = role 46 self.level = level 47 managedObject = self.managedObject().primaryAq() 48 managedObject.manage_setLocalRoles(self.getId(), (self.role,)) 49 managedObject.index_object()50 5153 managedObject = self.managedObject().primaryAq() 54 managedObject.manage_delLocalRoles((self.getId(),)) 55 managedObject.index_object() 56 self.userSetting.removeRelation() 57 self.managedObject.removeRelation()58 5961 return self.userSetting().email62 6365 return self.userSetting().pager66 6769 return self.userSetting().getPrimaryUrlPath()7072 mo = self.managedObject() 73 if mo.meta_type == 'Device': 74 return mo.id 75 return mo.getOrganizerName()7678 return self.managedObject().getEventSummary()7981 return self.managedObject().meta_type
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Oct 25 16:28:22 2007 | http://epydoc.sourceforge.net |