Python打卡考勤管理系统中的用户权限如何设置?

Python打卡考勤管理系统

def get_user_data(user_role, user_id=None, department_id=None):
if user_role == UserRole.ADMIN:
return db.query(“SELECT * FROM attendance_data”)
elif user_role == UserRole.SUPERVISOR:
return db.query(“SELECT * FROM attendance_data WHERE department_id = ?”, (department_id,))
elif user_role == UserRole.EMPLOYEE:
return db.query(“SELECT * FROM attendance_data WHERE user_id = ?”, (user_id,))

利唐i人事HR社区,发布者:HR数字化研究员,转转请注明出处:https://www.ihr360.com/hrnews/20241246673.html

(0)
上一篇 1天前
下一篇 1天前

相关推荐