[WIP] Enables 2 factor option for login#165
Conversation
Signed-off-by: Kevin <kevin@stealsyour.pw>
migrations/versions/e3a72926f808_.py
Outdated
| @@ -0,0 +1,28 @@ | |||
| """empty message | |||
There was a problem hiding this comment.
Add a comment here describing what the migration is for
postmaster/apiv1/admins.py
Outdated
| raise GenericError("2 Factor Secret has not been generated yet") | ||
| if admin.verify_totp(request.get_json(force=True).get('code')): | ||
| if not admin.otp_active: | ||
| auditMessage = 'The administrator "{0}" enabled 2 factor'.format( |
There was a problem hiding this comment.
All new Python code should have the variables in the style:
audit_message
|
@thatarchguy nice job on this. I have some comments/suggestions. Let me know if you want me to help or have any questions. |
47d517f to
28d11ea
Compare
Signed-off-by: Kevin <kevin@stealsyour.pw>
Signed-off-by: Kevin <kevin@stealsyour.pw>
… into ft-enable_2_factor
Signed-off-by: Kevin <kevin@stealsyour.pw>
Signed-off-by: Kevin <kevin@stealsyour.pw>
|
@thatarchguy, I've been thinking about this, and maybe the thing to do here is split the pull request in two. One for the backend work, and one for the frontend work. I think it's gotten to the point that we can't keep doing this dirty jQuery code and still have a UI that is manageable to maintain. Either we convert the UI to Angular 2, which I'm down (the only drawback is the lack of native x-editable), or we convert the table rows and columns to be jQuery objects. |
The front-end stuff can be pull requested off of this pull request. Weird I know. |
|
What do you mean? haha
Okay, let's go ahead and do this with jQuery objects. I had started it a while back and it seemed like a much cleaner way of doing it than what we're doing now. |
|
You can branch off of this branch with the front-end stuff and create a pull request into this branch. Then this pull request would have all the changes. |
|
@thatarchguy I'm saying we should merge in the backend separately, then have a separate PR to master for the frontend. |
Saving this merge request for after the release. Check it out though and critic it in the meantime.
I didn't update the readme yet though in fears of merge conflicts. Once you give the go ahead that the core code is satisfactory then I'll do up the readme. There will probably be a merge conflict with the build-release.sh file if we release before this is merged. Don't worry about that.
I introduced another js framework called bootboxjs. Basically I didn't want to keep making modals for confirmation dialogues. Check it out and tell me what you think.
Signed-off-by: Kevin kevin@stealsyour.pw