Bug 52918 - Validation does not test actual group membership
Validation does not test actual group membership
Status: CLOSED INVALID
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on: 52880
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-16 10:00 CET by Daniel Tröder
Modified: 2021-03-16 11:06 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021030921000604
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-03-16 10:00:50 CET
When I set the UCRV for the group prefix and open an existing user I should get a validation error. It does however not happen.

The groups returned by *.get_specific_groups() are calculated DNs, not the ones the user actually is a member of (UDM property "groups").

----------------------------------------------------------------
$ ucr set ucsschool/ldap/default/groupprefix/pupils=foo

$ python
[..]
st = Student.get_all(lo, "DEMOSCHOOL")[0]
st.get_specific_groups(lo)

['cn=Domain Users DEMOSCHOOL,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr',
 'cn=DEMOSCHOOL-Democlass,cn=klassen,cn=schueler,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr',
 'cn=fooDEMOSCHOOL,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr']

st.get_udm_object(lo)["groups"]

['cn=schueler-demoschool,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr',
 'cn=Domain Users DEMOSCHOOL,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr',
 'cn=DEMOSCHOOL-Democlass,cn=klassen,cn=schueler,cn=groups,ou=DEMOSCHOOL,dc=uni,dc=dtr']

----------------------------------------------------------------

The validation should check the actual group membership.
Comment 1 Daniel Tröder univentionstaff 2021-03-16 11:06:12 CET
My mistake.
After installing the ucs-school-lib package from git, I didn't run "update-python-modules -f" and thus the old code was used.