-
Notifications
You must be signed in to change notification settings - Fork 492
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
NAS-129780 / 24.10 / Simplify API for querying directory services users and groups #13942
Conversation
45ce29d
to
74a1f9b
Compare
6ab30af
to
5f892e1
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.
sshd_config.mako contains:
users = middleware.call_sync('user.query')
root_user = filter_list(users, [['username', '=', 'root']], {'get': True})
Presumably this should be updated. (And if not, maybe add a comment saying why not.)
plugins/smb.py share_precheck
contains
local_smb_user_cnt = await self.middleware.call(
'user.query',
[['smb', '=', True]],
{'count': True}
)
should this also be updated? (And if not, maybe add a comment saying why not.)
ffc7a35
to
2a7f966
Compare
Cache query responses are fast enough that we should include by default. Directory services users and groups can be reasonably omitted if filters explicitly call for local or builtin users. Remove currently-disabled old LDAP test and validate that DS users and groups returned via user.query and group.query. Add useful CallErrors if someone tries to modify DS user. Sometimes API consumers are over-enthusiastic about what they can do with users provided by AD / LDAP.
92497bf
to
f00c944
Compare
This PR has been merged and conversations have been locked. |
Cache query responses are fast enough that we should include by default. Directory services users and groups can be reasonably omitted if filters explicitly call for local or builtin users.