Autoprovision and Authenticator support with detailed examples - #5
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.
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.
Should the above user_is_anonymous() be inside this if statement?
There was a problem hiding this comment.
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.
Use tabs instead of spaces across the PR.
There was a problem hiding this comment.
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.
just return the expression instead if/else blocks.
There was a problem hiding this comment.
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.