-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add a new group template just as it is already there for adding users #219
base: main
Are you sure you want to change the base?
Conversation
@rotdrop may I ask you to sign-off your commits? |
Oops. Yes. Does it still work as this is not my original pull request? I have a look ... |
will work with the membership. Then you can also create branches in repos of the nextcloud organization :) |
Kind thanks, just joined!
Am 10.11.20 um 12:34 schrieb blizzz:
… will work with the membership. Then you can also create branches in
repos of the nextcloud organization :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#219 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALM54LH3JAOAYJ3QYAJFUTSPEQMPANCNFSM4SWBXCWA>.
--
Claus-Justus Heine himself@claus-justus-heine.de
http://www.claus-justus-heine.de/
Schatzmeister der Camerata Academica Freiburg e.V. --- www.cafev.de
|
406046b
to
290411d
Compare
Sorry for the delay.
Finally did it. However, this seems to have stripped the signature from
your cleanup commit; I did a "rebase -i" to be able to sign my two old
commits. AFAIK, there essentially is no other way to do this.
Best
Claus
Am 29.01.21 um 18:08 schrieb blizzz:
… @rotdrop <https://github.com/rotdrop> may I ask you to sign-off your
commits?
@rotdrop <https://github.com/rotdrop> would you mind?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#219 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALM54JXHQ22CJJ2SSAX7DLS4LTRBANCNFSM4SWBXCWA>.
--
Claus-Justus Heine himself@claus-justus-heine.de
http://www.claus-justus-heine.de/
Schatzmeister der Camerata Academica Freiburg e.V. --- www.cafev.de
|
290411d
to
d324a20
Compare
d324a20
to
d168db1
Compare
Rationale: this allows to support "custom" group LDAP classes, like the groupOfMembers class of the rfc2307bis draft. The core user_ldap app could also be changed to make this more handy, but already allows custom group filters. Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
d168db1
to
d5a5555
Compare
@@ -82,15 +92,27 @@ public function respondToActions() { | |||
* @return string|null | |||
*/ | |||
public function createGroup($gid) { | |||
$adminUser = $this->userSession->getUser(); | |||
$requireActorFromLDAP = $this->configuration->isLdapActorRequired(); | |||
if ($requireActorFromLDAP && !$adminUser instanceof IUser) { |
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.
if ($requireActorFromLDAP && !$adminUser instanceof IUser) { | |
if ($requireActorFromLDAP && !($adminUser instanceof IUser)) { |
I was unsure of the precedence between operators here so I expect others might
try { | ||
$connection = $this->ldapProvider->getLDAPConnection($adminUser->getUID()); | ||
// TODO: what about multiple bases? | ||
$base = $this->ldapProvider->getLDAPBaseGroups($adminUser->getUID()); |
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.
$base = $this->ldapProvider->getLDAPBaseGroups($adminUser->getUID()); | |
$base = $this->ldapProvider->getLDAPBaseGroups($adminUser->getUID())[0]; |
To match line 112, no?
'cn' => $gid, | ||
'member' => [''] | ||
]; | ||
private function buildNewEntry($gid, $base): array { |
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.
Please type parameters
$value = trim($split[1]); | ||
if (!isset($entry[$key])) { | ||
$entry[$key] = $value; | ||
} else if (is_array($entry[$key])) { |
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.
} else if (is_array($entry[$key])) { | |
} elseif (is_array($entry[$key])) { |
@@ -107,6 +107,8 @@ public function respondToActions() { | |||
* @throws ServerNotAvailableException | |||
*/ | |||
public function setDisplayName($uid, $displayName) { | |||
trigger_error(__METHOD__); |
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.
trigger_error(__METHOD__); |
Forgotten debug?
@@ -51,7 +51,9 @@ public function getForm() { | |||
'templates', | |||
[ | |||
'user' => $this->config->getUserTemplate(), | |||
'userDefault' => $this->config->getUserTemplateDefault(), | |||
'userDefault' => $this->config->getGroupTemplateDefault(), |
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.
'userDefault' => $this->config->getGroupTemplateDefault(), | |
'userDefault' => $this->config->getUserTemplateDefault(), |
<h3>{{ t('ldap_write_support', 'Group template') }}</h3> | ||
<p>{{ t('ldap_write_support', 'LDIF template for creating groups. Following placeholders may be used') }}</p> | ||
<ul class="disc"> | ||
<li><span class="mono">{GID}</span> – {{ t('ldap_write_support', 'the group id provided by the (sub)admin') }}</li> |
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.
int or string? Should be made clear.
<p>{{ t('ldap_write_support', 'LDIF template for creating groups. Following placeholders may be used') }}</p> | ||
<ul class="disc"> | ||
<li><span class="mono">{GID}</span> – {{ t('ldap_write_support', 'the group id provided by the (sub)admin') }}</li> | ||
<li><span class="mono">{BASE}</span> – {{ t('ldap_write_support', 'the LDAP node of the acting (sub)admin or the configured group base') }}</li> |
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.
The base of the acting subadmin, right?
group: Object, | ||
groupDefault: Object, |
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.
identation seems off
}); | ||
return; | ||
} | ||
OCP.AppConfig.setValue('ldap_write_support', 'template.group', this.templates.group); |
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 be this.groupTemplate
to be consistent, or change the user template to this.templates.user
.
continuation and rebase of #214