Skip to content

Conversation

@V1pr
Copy link

@V1pr V1pr commented Apr 15, 2018

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.

V1pr added 2 commits April 15, 2018 17:36
- added class to support auth
- added credentials page support (Mantis support is needed to work!)
@V1pr V1pr changed the title Autoprovision and Authenticator support Autoprovision and Authenticator support with detailed examples Apr 17, 2018
@V1pr
Copy link
Author

V1pr commented Apr 21, 2018

@fmancardi suggested to have a flow diagram on the auth mechanism (at least, the way I think it is). Please find it attached.
auth_data_flow

… disable signup e-mails when doing autoprov

some minor tidyup
Copy link
Member

@vboctor vboctor left a 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 ) {
Copy link
Member

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?

Copy link
Author

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
Copy link
Member

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.

Copy link
Author

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' ) {
Copy link
Member

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.

Copy link
Author

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.

@V1pr
Copy link
Author

V1pr commented May 24, 2020

Sorry for the late reply, was busy with other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants