-
Notifications
You must be signed in to change notification settings - Fork 17
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 samaccountname to session #254
Conversation
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
============================================
- Coverage 35.39% 35.39% -0.01%
- Complexity 1361 1368 +7
============================================
Files 32 32
Lines 3936 3953 +17
============================================
+ Hits 1393 1399 +6
- Misses 2543 2554 +11
Continue to review full report at Codecov.
|
Could be here possible to add a configuration option in the config.php like:
In case that the server in an LDAP and does not have |
lib/User_LDAP.php
Outdated
// hack to store a samaccountname in the session | ||
$samaccountname = $userEntry->getSAMAccountName(); | ||
if ($samaccountname !== null) { | ||
\OC::$server->getSession()->set('samaccountname', $samaccountname); |
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.
I'd like to call this "alternateLogin" or something more generic to make it reusable
@DeepDiver1975 are you ok with this approach ?
also see https://github.com/owncloud/windows_network_drive/pull/175 and owncloud/core#31951 for usage
if we agree I'll adjust the PRs to rename the attributes
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.
had a chat with @DeepDiver1975 and he's ok with this
in that case I'd rather have a more generic setting called something like |
7cf710d
to
74cce70
Compare
|
lib/Connection.php
Outdated
@@ -94,6 +99,9 @@ public function __construct(ILDAPWrapper $ldap, Configuration $configuration, $c | |||
$this->hasPagedResultSupport = | |||
(int)$this->configuration->ldapPagingSize !== 0 | |||
|| $this->getLDAP()->hasPagedResultSupport(); | |||
|
|||
// TODO: should this be in Configuration / Wizard ? | |||
$this->altLoginAttribute = $this->configuration->getCoreConfig()->getSystemValue('user_ldap.altloginattribute', 'samaccountname'); |
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.
We need to document this - somewhere. It will get lost / forgotten.
In the context of ldap this is not an alternate login name. It is the
Currently ownCloud cannot explicitly store the username that might have been configured as the login attribute, eg To clarify: there is no alternate login. It literally IS the I'll clean this up later. Currently looking into the core part. |
then we could rename "altLoginName" in the core PRs to something like "extusername" or "externalusername" ? (meaning the user name from the external system, as it's not stored currently) |
lib/User_Proxy.php
Outdated
IProvidesQuotaBackend, | ||
IProvidesExtendedSearchBackend, | ||
IProvidesEMailBackend, | ||
IProvidesUserNameBackend |
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.
since this only exists in 10.0.10 through owncloud/core#32579, we need to set min-version to 10.0.10
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.
@butonic please adjust
@butonic can you finish this or hand over ? |
8626a0a
to
8694cd4
Compare
161a5d9
to
f158e01
Compare
I renamed alt login name to username because that is what it is. It can currently only be set via cli and defaults to |
some test needs adjusting for the new attribute:
|
41ff3df
to
dc19db2
Compare
add samaccountname to session Renamed "samaccountname" session var to "altloginname" Configurable altloginname attribute allow username sync instead of storing in session IProvidesUserNameBackend requires 10.0.10 fix codestyle fix rebase fix copy paste use Username instead of alt loginname, use ldap Configuration, add test fix CommandTest
dc19db2
to
bb4c72c
Compare
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.
👍
use samaccountname for wnd