コード例 #1
0
ファイル: users.py プロジェクト: SqrtMinusOne/ERMaket
 def _table_rights(self, rights):
     vals = IndexedSet([
         'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES',
         'TRIGGER'
     ])
     return vals.intersection(set(rights))
コード例 #2
0
 def _update_children(self):
     ids = IndexedSet([elem.id for elem in self])
     for section in self.sections:
         children = IndexedSet([id.value for id in section.children])
         children = children.intersection(ids)
         section.children = Children([ChildId(id) for id in children])