mirror of
https://ghfast.top/https://github.com/discourse/discourse-shared-edits.git
synced 2026-07-15 11:17:01 +08:00
Some checks failed
Discourse Plugin / ci (push) Has been cancelled
Allow sites to choose which groups can enable or disable shared edits instead of hardcoding staff and TL4 users. Expose the permission on the current user serializer so the admin menu can hide toggle actions for unauthorized users. Add rate limits to privileged reset and recover endpoints, and update specs, acceptance tests, docs, and settings copy for the new permission model. * Update config/settings.yml Co-authored-by: Martin Brennan <martin@discourse.org> * fix spec --------- Co-authored-by: Martin Brennan <martin@discourse.org>
18 lines
670 B
JavaScript
18 lines
670 B
JavaScript
import { click, visit } from "@ember/test-helpers";
|
|
import { test } from "qunit";
|
|
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
|
|
|
acceptance("Discourse Shared Edits | Toggle permissions", function (needs) {
|
|
needs.user({ can_toggle_shared_edits: false });
|
|
needs.settings({ shared_edits_enabled: true });
|
|
|
|
test("hides the post admin toggle action", async function (assert) {
|
|
await visit("/t/internationalization-localization/280");
|
|
await click(".show-more-actions");
|
|
await click(".show-post-admin-menu");
|
|
|
|
assert
|
|
.dom(".admin-toggle-shared-edits")
|
|
.doesNotExist("the shared edits toggle action is hidden");
|
|
});
|
|
});
|