def create_role(self, rolename, permissions=[]): r = Role(rolename=rolename, permissions=permissions) r.id = self.calculate_id(rolename) r.create_date = datetime.now() r.change_date = r.create_date r.created_by = "UNBEKANNT" r.type = self.TYPE_KEY r.store(self.db) return r
def create_role(self, rolename, permissions=[]): r = Role(rolename=rolename, permissions=permissions) r.id = self.calculate_id(rolename) r.type = 'role' r.store(self.db) return r