##// END OF EJS Templates
added user group to perm table
marcink -
r958:7d1483f3 beta
parent child Browse files
Show More
@@ -253,6 +253,16 b' class UserToPerm(Base, BaseModel):'
253 253 user = relation('User')
254 254 permission = relation('Permission')
255 255
256 class UsersGroupToPerm(Base, BaseModel):
257 __tablename__ = 'users_group_to_perm'
258 __table_args__ = (UniqueConstraint('users_group_id', 'permission_id'), {'useexisting':True})
259 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
260 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_groups_id'), nullable=False, unique=None, default=None)
261 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
262
263 users_group = relation('UsersGroup')
264 permission = relation('Permission')
265
256 266 class GroupToPerm(Base, BaseModel):
257 267 __tablename__ = 'group_to_perm'
258 268 __table_args__ = (UniqueConstraint('group_id', 'permission_id'), {'useexisting':True})
General Comments 0
You need to be logged in to leave comments. Login now