Skip to content
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

Index managerRolesAndUsers on the object itself #283

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

reinhardt
Copy link
Contributor

... without switching from client to admin.

Refs syslabcom/scrum#2640

@reinhardt reinhardt requested a review from thet September 16, 2024 13:05
Copy link
Member

@thet thet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise, it does look good to me. Except that I'd wish for more comments, explaining some architectural details which are wired into the code but hard to understand. E.g. why is the "Owner" role removed in manageRolesAndUsers. Or why this replacement of client with sectors in filter_permissions - what are these hard-coded content ids all about again?

Business logic wise I can't say much, because it's hard for me to understand. I always have to rethink myself into OiRA after being away from that project for some time, because there are is so much implicit, undocumented business logic and un-Plonish code weaven into that app.

@reinhardt
Copy link
Contributor Author

I don't know about the Owner role. Perhaps that's copied from allowedRolesAndUsers. The docstring does say that it's modeled after that one.

Surveys are copied from sectors to client when they are published. That's a peculiarity of euphorie, but I think it's a bit too basic to explain it in the mailing list code. It's a fact that's used all over the place. In case of the mailing lists we only want to show tools that the user has admin permissions on (i.e. on the CMS side, in sectors). OK, maybe that's worth mentioning? But if you know that each client tool has an admin counterpart in sectors then it kind of explains itself, doesn't it?

Would it help to go through the code in a call?

@reinhardt reinhardt force-pushed the scrum-2640-mailing-lists-index branch from 660dd4c to 855db26 Compare September 17, 2024 07:29
@reinhardt
Copy link
Contributor Author

I've pushed a fix (removed more lines from managerRolesAndUsers) and added a docstring to filter_permission.

@reinhardt reinhardt requested a review from thet September 17, 2024 07:31
Copy link
Member

@thet thet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, also for the explanation above. copied them into my own oira docs :)
LGTM

@reinhardt reinhardt merged commit fb18099 into main Sep 17, 2024
2 checks passed
@reinhardt reinhardt deleted the scrum-2640-mailing-lists-index branch September 17, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants