Skip to content
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

Personalize LDAP fields cached #1637

Closed

Conversation

maturbet
Copy link
Contributor

To customize the list of ldap account fields to be cached for a user.

@maturbet maturbet changed the title Personalise LDAP fileds cached Personalise LDAP fields cached Mar 23, 2020
@maturbet maturbet changed the title Personalise LDAP fields cached Personalize LDAP fields cached Mar 23, 2020
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.

Thanks @maturbet for your contribution.

  1. Please update $g_public_config_names with the new config option name.
  2. Update manual with new config option configuration.
  3. Add an issue in the bug tracker and reference it from the commit.

config_defaults_inc.php Outdated Show resolved Hide resolved
@atrol
Copy link
Member

atrol commented Mar 24, 2020

Please update $g_public_config_names with the new config option name.

@vboctor why do you want it in $g_public_config_names?
Similar options like $g_ldap_uid_field are not part of this list.

Independent from that, shouldn't we add all ldap options to $g_global_settings?

@maturbet maturbet requested a review from vboctor March 25, 2020 08:12
@maturbet
Copy link
Contributor Author

Is there any hope to view it in MantisBT 2.25 ?

@vboctor
Copy link
Member

vboctor commented Mar 28, 2020

@atrol I'm fine with your recommendations.

@vboctor
Copy link
Member

vboctor commented Mar 28, 2020

@maturbet can you elaborate on scenarios where adding more fields (like the room number) would add value? I look at the issue and don't see the scenarios where this would be useful.

@atrol
Copy link
Member

atrol commented Mar 28, 2020

@atrol I'm fine with your recommendations.

@vboctor I opened #1639 for

Independent from that, shouldn't we add all ldap options to $g_global_settings?

Concerning my other recommendation

@vboctor why do you want it in $g_public_config_names?

To be sure, it means you agree that @maturbet should remove the setting from this array?

@maturbet
Copy link
Contributor Author

@maturbet can you elaborate on scenarios where adding more fields (like the room number) would add value? I look at the issue and don't see the scenarios where this would be useful.

@vboctor here an exemple how we use this functionnality :
exemple_ldap.txt
Sélection_001
Sélection_002

Copy link
Member

@dregad dregad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this PR is basically in support of a local customization, i.e. adding a new ldaplink custom field type that you have defined in your installation.

Unless we are planning to add this to core as well (and I personally don't believe we should), it does not make sense to update the LDAP API per your suggestion.

In my opinion you should maintain this custom code in your own fork.

@maturbet
Copy link
Contributor Author

maturbet commented Apr 1, 2020

@dregad
It was just an example.
The strength of MantisBT is that it is highly customizable, with the possibility of many parameters, the custom_functions as well as the EVENT_* make this tool very attractive.
It's a sad thing that with such a policy, there is such a static list ($t_search_attrs) with hard-coded values and not customizable.

@maturbet maturbet requested a review from dregad April 1, 2020 08:50
@maturbet
Copy link
Contributor Author

maturbet commented Apr 1, 2020

@vboctor @dregad
An other exemple (not implemented yet in internal plugin) :
Associated with EVENT_MENU_ACCOUNT we will be able to add to the user's menu, specific links composed with data from LDAP.

Many informations could be usefull in LDAP, not only mail or realName

@maturbet
Copy link
Contributor Author

maturbet commented Apr 1, 2020

an other exemple (not from us)
https://www.mantisbt.org/bugs/view.php?id=23392

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 suggest updating the issue in the bug tracker with the plugin scenario. I also added a couple of minor comments.

docbook/Admin_Guide/en-US/config/auth.xml Outdated Show resolved Hide resolved
docbook/Admin_Guide/en-US/config/auth.xml Outdated Show resolved Hide resolved
config_defaults_inc.php Outdated Show resolved Hide resolved
@maturbet maturbet requested a review from vboctor April 3, 2020 07:30
@dregad
Copy link
Member

dregad commented Apr 3, 2020

image

😂

@maturbet
Copy link
Contributor Author

maturbet commented Apr 6, 2020

@dregad seriez-vous francophone ? ;-)

@dregad
Copy link
Member

dregad commented Apr 7, 2020

Je suis démasqué 👼

@maturbet
Copy link
Contributor Author

@dregad @vboctor
Does that make sense to be added ?
Association-Cocktail#1

@vboctor
Copy link
Member

vboctor commented Apr 11, 2020

@maturbet I wonder if what is really needed here is a plugin event that allows adding more fields to the list loaded by LDAP API. This would enable building a plugin that can fetch more LDAP fields and display them or use them in the appropriate scenarios. I would generally prefer that model over the approach in this PR and the one you linked to for adding to the user profile page.

@maturbet
Copy link
Contributor Author

@vboctor I agree with you, it would certainly be much better.
However, I'm not a developer, I don't know much about php and I wouldn't know how to create a plugin event. I also don't see how to make these fields appear in the user profile pages via a plugin.
But maybe I'll try ...

@maturbet
Copy link
Contributor Author

maturbet commented Apr 21, 2020

During my personal time :
@vboctor, do you prefer this way ?
#1660

@maturbet
Copy link
Contributor Author

maturbet commented May 4, 2020

Well, I'm throwing in the towel.

@maturbet maturbet closed this May 4, 2020
@maturbet maturbet deleted the maturbet-cacheldap-1 branch May 28, 2020 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants