Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

比赛权限控制 #10

Open
cugb1004101218 opened this issue Sep 8, 2014 · 0 comments
Open

比赛权限控制 #10

cugb1004101218 opened this issue Sep 8, 2014 · 0 comments
Labels

Comments

@cugb1004101218
Copy link
Contributor

目前任何人都能进入比赛,还没有加入权限逻辑。建议实现方法如下:
目前每个比赛有个user_list字段,只有在user_list中的user才能进入比赛,可以先通过session得到当前登录用户的user_id,然后看是否在user_list中,如果在就跳转到比赛题目页面,如果不在就跳转到一个页面提示说他没权限。建议这个逻辑写到views/contest.py中。目测10行之内搞定。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant