-
Notifications
You must be signed in to change notification settings - Fork 80
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
Admin: Don't require publish_post cap to get activitypub cap #1210
Conversation
This was on purpose. The |
Hm, not quite sure I understand. It currently only adds the The PR doesn't change that, fwiw, it just surfaces a message now when that condition gets hit, to no longer fail silently. |
No, this is only the default we set when you install the plugin, but you can add the cap to every user regardless of the |
includes/class-activitypub.php
Outdated
$user = \get_user_by( 'id', $user_id ); | ||
$user->add_cap( 'activitypub' ); | ||
} | ||
\get_user_by( 'id', $user_id )->add_cap( 'activitypub' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default we only want to add the "activitypub" capability to users that can edit posts. The admin can change this afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I misunderstood your comment then
includes/class-migration.php
Outdated
// Add ActivityPub capability to all users that can publish posts. | ||
foreach ( $users as $user ) { | ||
// Add ActivityPub capability to all users. | ||
foreach ( \get_users() as $user ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: Only users with the publish_post
capability should be migrated, the rest has to be done by hand.
Gives context to why a user couldn't be given ActivityPub access, rather than failing silently.
This reverts commit ccdad5c.
d31bb8b
to
59d69f2
Compare
Gives context to why a user couldn't be given ActivityPub access, rather than failing silently.
Proposed changes:
Testing instructions: