-
Notifications
You must be signed in to change notification settings - Fork 8
Autoprovision and Authenticator support with detailed examples #5
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
base: master
Are you sure you want to change the base?
Conversation
- added class to support auth - added credentials page support (Mantis support is needed to work!)
|
@fmancardi suggested to have a flow diagram on the auth mechanism (at least, the way I think it is). Please find it attached. |
… disable signup e-mails when doing autoprov some minor tidyup
vboctor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some comments. Maybe more to come one we finalize the main PR.
| } | ||
|
|
||
| $t_access_level = user_get_access_level( $t_user_id, ALL_PROJECTS ); | ||
| if( $t_user_id ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the above user_is_anonymous() be inside this if statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, and I really don't see any point getting the user_access_level if it's not really needed.
|
|
||
| # Have administrators use default login flow | ||
| if( $t_access_level >= ADMINISTRATOR ) { | ||
| # Have administrators use default login flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use tabs instead of spaces across the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having tabs here in midnight commander, however, they are 4 spaces wide tabs.
| # comment this out for testing or write your own | ||
| return false; | ||
|
|
||
| if( $username == 'john.doe' && $password == 'Abc.123' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just return the expression instead if/else blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't get what you mean here. The 'auth' function should do the authentication, the john.doe is just an example for a simple behaviour.
|
Sorry for the late reply, was busy with other things. |

I made some changes to the plugin to be able to support autoprovision and to be able to integrate it with a bit more into Mantis' auth flow. Some changes in Mantis Core is also necessary (separate pull).
A newly added class gives insight on how can one build a custom auth module. Pages are a bit rewritten, to make a better example on the usage. README is also extended to give a bit more insight on the concept.