Review interaction of todos creation for admins with/without admin mode
Interaction of admin mode (behind feature flag) with Todo's creation:
- Current behaviour: if somebody mentions an admin anywhere, they get a todo created
- With admin mode flag: If somebody explicitly mentions an admin somewhere, when the admin is not part of the project, the admin won't get a todo; while I agree with the behaviour, I wonder if this could be unexpected for some people or use cases
🤔 - There's also different behaviours when the admin has admin mode active or not: for the short bursts of admin mode enabled, the admin would get todos created if they are mentioned anywhere. In practice I guess it would be a non-problem, but maybe also unexpected.
The following discussion from !45988 (merged) should be addressed:
-
@dlouzan started a discussion: (+6 comments) I tried to migrate this one, but maybe there's a conceptional issue, here we have one tricky case: the todo service will use
DeclarativePolicy.policy_for(admin, target).debug(:read_issue)to determine when to create todos for mentions, and this only is fulfilled when the user is in admin mode. But the todo creation happens in the context of another user, not the admin, so it will never be active.🤔 Would we have issues like this in other places, and how should we proceed? I'd be happy for guidance or tips.
/cc @ifarkas @reprazent