-
Notifications
You must be signed in to change notification settings - Fork 20
[full-ci] Expose group's displayname #748
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
Changes from all commits
44cbdf6
9dddf58
bbd48bd
71a19e7
9a7bb37
a3fb7cb
a724b9b
4ad04c3
b618814
f804a03
11cd328
77f72ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?php | ||
| namespace OCA\User_LDAP\Migrations; | ||
|
|
||
| use OCP\Migration\ISimpleMigration; | ||
| use OCP\Migration\IOutput; | ||
| use OCP\IConfig; | ||
| use OCA\User_LDAP\Helper; | ||
|
|
||
| class Version20220725070804 implements ISimpleMigration { | ||
| /** @var IConfig */ | ||
| private $config; | ||
| /** @var $helper */ | ||
| private $helper; | ||
|
|
||
| /** | ||
| * @param IConfig $config | ||
| */ | ||
| public function __construct(IConfig $config, Helper $helper) { | ||
| $this->config = $config; | ||
| $this->helper = $helper; | ||
| } | ||
| /** | ||
| * @param IOutput $out | ||
| */ | ||
| public function run(IOutput $out) { | ||
| $prefixes = $this->helper->getServerConfigurationPrefixes(); | ||
| foreach ($prefixes as $prefix) { | ||
| $groupnameValue = $this->config->getAppValue('user_ldap', "{$prefix}ldap_expert_groupname_attr", null); | ||
| if ($groupnameValue === null) { | ||
| $groupDisplaynameValue = $this->config->getAppValue('user_ldap', "{$prefix}ldap_group_display_name", null); | ||
| if ($groupDisplaynameValue !== null) { | ||
| $this->config->setAppValue('user_ldap', "{$prefix}ldap_expert_groupname_attr", $groupDisplaynameValue); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,6 +290,14 @@ | |
| <input type="text" id="ldap_expert_username_attr" name="ldap_expert_username_attr" data-default="<?php p($_['ldap_expert_username_attr_default']); ?>" /> | ||
| </div> | ||
| </section> | ||
| <section> | ||
| <h3><?php p($l->t('Internal Groupname')); ?></h3> | ||
| <p><?php p($l->t('The internal groupname is used to uniquely identify the group. It has the same restrictions as the internal username, in particular, the group name must be immutable and unique. By default, the UUID will be used. This internal groupname won\'t likely by visible because a displayname attribute is intended to be used to show the group.')); ?></p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "It has the same restrictions as the internal username" - but probably a larger set of characters will work.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The internal username has |
||
| <div class="tablerow"> | ||
| <label for="ldap_expert_groupname_attr"><?php p($l->t('Internal Groupname Attribute:')); ?></label> | ||
| <input type="text" id="ldap_expert_groupname_attr" name="ldap_expert_groupname_attr" data-default="<?php p($_['ldap_expert_groupname_attr_default']); ?>" /> | ||
| </div> | ||
| </section> | ||
| <section> | ||
| <h3><?php p($l->t('Override UUID detection')); ?></h3> | ||
| <p><?php p($l->t('By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups.')); ?></p> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.