'Constructor'

def __init__(self, *args, **kwargs):

    super(S3EntityRoleManager, self).__init__(*args, **kwargs)
    self.realm = self.get_realm()
    self.realm_users = current.s3db.pr_realm_users(self.realm)
    self.roles = {}
    self.modules = self.get_modules()
    self.acls = self.get_access_levels()
    for (module_uid, module_label) in self.modules.items():
        for (acl_uid, acl_label) in self.acls.items():
            role_uid = ('%s_%s' % (module_uid, acl_uid))
            self.roles[role_uid] = {'module': {'uid': module_uid, 'label': module_label}, 'acl': {'uid': acl_uid, 'label': acl_label}}
