The PHID for logged out users is NULL, but so is the PHID for un-owned objects.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- Restricted Diffusion Commit
rPa03a488ba61b: Don't claim logged out users are automatically subscribed to un-owned objects
Browse a non-owned object (i.e. unassigned task) while logged out, notice "Automatically subscribed" before this commit.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- WM-T92508
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5887 Build 5907: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Instead of fixing this in every object, let's just fix it in PhabricatorSubscriptionsUIEventListener? Public users can never be subscribed to anything, and it will never make sense to let them subscribe to things (the operation is meaningless) so we don't need to test if they're automatically subscribed at all.
Since "0" isn't a valid PHID, it's sufficient to just test for $phid instead of !is_null($phid).
Comment Actions
Just fix the caller in PhabricatorSubscriptionsUIEventListener.
Fiddle around with user PHID variables to avoid >80 characters lint warning.
Comment Actions
Thanks!
src/applications/subscriptions/interface/PhabricatorSubscribableInterface.php | ||
---|---|---|
10–11 | I think this is obsolete, I'll just leave it out of the pull. |