updated settings

This commit is contained in:
2025-07-17 16:01:10 +03:00
parent 52e4daf37f
commit e37cbf9fee
5 changed files with 343 additions and 181 deletions

View File

@@ -30,6 +30,16 @@ class User(db.Model, UserMixin):
"""Check if user has admin role"""
return self.role == 'admin'
@property
def is_super_admin(self):
"""Check if user has super admin role"""
return self.role == 'sadmin'
@property
def has_admin_access(self):
"""Check if user has any admin access (admin or super admin)"""
return self.role in ['admin', 'sadmin']
@property
def is_active(self):
"""Required by Flask-Login"""