Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-plugins
Commits
44d6a08d
Unverified
Commit
44d6a08d
authored
4 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(samba) Avoid errors on samba tab of user templates
issue
#6094
parent
a391d6c4
dev
6104-mail-methods-refactor
6231-give-the-ability-to-the-webservice-to-notice-if-an-attribute-is-monovalued-or-multivalued
6237-add-requiredattrs-array-to-the-webservice-informations
6245-adapt-the-ci-to-the-reorganisation-of-the-dev-tools-and-fixing-the-trigger-downstream-pipelines
6250-supann-configuration-backend-requires-account-life-cycle-section
6280-plugins-update-plugins-to-take-into-consideration-the-new-directory-of-core-structure
6310-tasks-reminder-error-in-the-schema-duplicate-attribute-id
6311-put-the-version-1-5-in-all-yaml-for-fusiondirectory-1-5
6322-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen-2
6332-zimbra-allows-update-of-data-for-unknown-domain-name-for-specific-individual-aliases
6337-webservice-issue-with-archiving-post-request-not-responding-but-successfully-archiving-user
6341-supann-extract-resources-states-sub-states-from-backend-configuration-to-their-own-objects
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
samba/personal/samba/class_sambaAccount.inc
+7
-2
samba/personal/samba/class_sambaAccount.inc
with
7 additions
and
2 deletions
+7
-2
samba/personal/samba/class_sambaAccount.inc
+
7
−
2
View file @
44d6a08d
...
@@ -516,6 +516,11 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
...
@@ -516,6 +516,11 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
return
$errors
;
return
$errors
;
}
}
if
(
$this
->
is_template
)
{
/* Skip synchronisations and generations on templates */
return
$errors
;
}
// Generate rid / primaryGroupId
// Generate rid / primaryGroupId
if
(
!
isset
(
$config
->
data
[
'SERVERS'
][
'SAMBA'
][
$this
->
sambaDomainName
][
'SID'
]))
{
if
(
!
isset
(
$config
->
data
[
'SERVERS'
][
'SAMBA'
][
$this
->
sambaDomainName
][
'SID'
]))
{
$error
=
new
SimplePluginError
(
$this
,
htmlescape
(
_
(
'Undefined Samba SID detected. Please fix this problem manually!'
)));
$error
=
new
SimplePluginError
(
$this
,
htmlescape
(
_
(
'Undefined Samba SID detected. Please fix this problem manually!'
)));
...
@@ -525,7 +530,7 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
...
@@ -525,7 +530,7 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
$this
->
ridBase
=
$config
->
data
[
'SERVERS'
][
'SAMBA'
][
$this
->
sambaDomainName
][
'RIDBASE'
];
$this
->
ridBase
=
$config
->
data
[
'SERVERS'
][
'SAMBA'
][
$this
->
sambaDomainName
][
'RIDBASE'
];
}
}
// Need to generate a new uniqe uid/gid combination?
// Need to generate a new uniq
u
e uid/gid combination?
if
((
$this
->
sambaSID
==
''
)
||
$this
->
attributesAccess
[
'sambaDomainName'
]
->
hasChanged
())
{
if
((
$this
->
sambaSID
==
''
)
||
$this
->
attributesAccess
[
'sambaDomainName'
]
->
hasChanged
())
{
$ldap
=
$config
->
get_ldap_link
();
$ldap
=
$config
->
get_ldap_link
();
if
(
$config
->
get_cfg_value
(
'sambaDependsOnPosix'
,
'TRUE'
)
!==
'FALSE'
)
{
if
(
$config
->
get_cfg_value
(
'sambaDependsOnPosix'
,
'TRUE'
)
!==
'FALSE'
)
{
...
@@ -542,7 +547,7 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
...
@@ -542,7 +547,7 @@ class sambaAccount extends simplePlugin implements UserTabLockingAction
$this
->
attrs
[
'sambaSID'
]
=
$sid
;
$this
->
attrs
[
'sambaSID'
]
=
$sid
;
}
}
if
(
!
$this
->
is_template
&&
isset
(
$this
->
parent
->
by_object
[
'posixAccount'
])
&&
$this
->
parent
->
by_object
[
'posixAccount'
]
->
is_account
)
{
if
(
isset
(
$this
->
parent
->
by_object
[
'posixAccount'
])
&&
$this
->
parent
->
by_object
[
'posixAccount'
]
->
is_account
)
{
$ldap
=
$config
->
get_ldap_link
();
$ldap
=
$config
->
get_ldap_link
();
// Check for users primary group
// Check for users primary group
$ldap
->
cd
(
$config
->
current
[
'BASE'
]);
$ldap
->
cd
(
$config
->
current
[
'BASE'
]);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets