Add editing for published statuses (#17320)
* Add editing for published statuses * Fix change of multiple-choice boolean in poll not resetting votes * Remove the ability to update existing media attachments for now
This commit is contained in:
parent
20a3564ab2
commit
63002cde03
25 changed files with 839 additions and 77 deletions
|
@ -125,7 +125,7 @@ RSpec.describe StatusPolicy, type: :model do
|
|||
end
|
||||
end
|
||||
|
||||
permissions :index?, :update? do
|
||||
permissions :index? do
|
||||
it 'grants access if staff' do
|
||||
expect(subject).to permit(admin.account)
|
||||
end
|
||||
|
@ -134,4 +134,18 @@ RSpec.describe StatusPolicy, type: :model do
|
|||
expect(subject).to_not permit(alice)
|
||||
end
|
||||
end
|
||||
|
||||
permissions :update? do
|
||||
it 'grants access if staff' do
|
||||
expect(subject).to permit(admin.account, status)
|
||||
end
|
||||
|
||||
it 'grants access if owner' do
|
||||
expect(subject).to permit(status.account, status)
|
||||
end
|
||||
|
||||
it 'denies access unless staff' do
|
||||
expect(subject).to_not permit(bob, status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue