UMBC-CMSC447-Spring2017-Team5 / college-JUMP

https://lassa.xen.prgmr.com/collegejump/
GNU General Public License v3.0
0 stars 0 forks source link

Require admin login for some pages #53

Closed alexander-bauer closed 7 years ago

alexander-bauer commented 7 years ago

Some pages have the @app.login_required directive, but do not otherwise check whether the logged in user is an admin.

alexander-bauer commented 7 years ago

This can be accomplished by building a similar admin_required decorator.

Mjacks3 commented 7 years ago

@alexander-bauer ``image

alexander-bauer commented 7 years ago

@Mjacks3 We're going to have to write this decorator ourselves, but it should be fairly simple.

alexander-bauer commented 7 years ago

Since the @admin_required directive is implemented now, all that's left to do is make sure editing of accounts is properly locked down. @Mjacks3 can you take care of that?

Mjacks3 commented 7 years ago

yup. leave it to me!

Mjacks3 commented 7 years ago

@alexander-bauer I tested (admin) account creation, editing, deletion and profile editing. all good (user) profile editing, edit accounts page access, non-self profile access and self deletion. all success

alexander-bauer commented 7 years ago

@Mjacks3 I just poked at the code, and it looks good. I'm comfortable closing this.