Univention Bugzilla – Attachment 9779 Details for
Bug 48357
listener modules created with new listener API always displayed with status=0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
simple listener module
user_change_logging.py (text/x-python), 984 bytes, created by
Daniel Tröder
on 2018-12-16 08:52:00 CET
(
hide
)
Description:
simple listener module
Filename:
MIME Type:
Creator:
Daniel Tröder
Created:
2018-12-16 08:52:00 CET
Size:
984 bytes
patch
obsolete
>from __future__ import absolute_import >from univention.listener import ListenerModuleHandler > > >class UserAndGroupChangeLogging(ListenerModuleHandler): > class Configuration: > name = 'user_and_group_change_logging' > description = 'log changes to user and group objects' > ldap_filter = '(|(objectClass=posixAccount)(objectClass=univentionGroup))' > attributes = [] > > def user_or_group(self, attrs, upper=False): > res = 'user' if 'uid' in attrs else 'group' > if upper: > res = '{}{}'.format(res[0].upper(), res[1:]) > return res > > def create(self, dn, new): > self.logger.info('New %s created at DN %r with attributes %r', self.user_or_group(new), dn, new) > > def modify(self, dn, old, new, old_dn): > self.logger.info('Attributes of %s %r changed: %r', self.user_or_group(new), dn, self.diff(old, new)) > if old_dn: > self.logger.info('It is also a move! old_dn: %r', old_dn) > > def remove(self, dn, old): > self.logger.info('%s %r was removed.', self.user_or_group(old, True), dn)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 48357
: 9779