-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add ability to restrict users to specific languages #2458
Conversation
NOTE: This is working, but looking for feedback on implementation before finalizing and filling out test suite. If manually testing, you'll need to add languages to the user in the Rails console, like
|
end | ||
|
||
it "cannot manage a language they do not have access to" do | ||
user = create(:alchemy_dummy_user, :as_editor, languages: create_list(:alchemy_language, 1, :german)) |
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.
Lint/UselessAssignment: Useless assignment to variable - user.
@@ -177,6 +252,24 @@ | |||
it "can manage tags" do | |||
is_expected.to be_able_to(:manage, Alchemy::Tag) | |||
end | |||
|
|||
it "can index languages in sites they can access" do | |||
user = create(:alchemy_dummy_user, :as_editor, languages: create_list(:alchemy_language, 1, :german)) |
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.
Lint/UselessAssignment: Useless assignment to variable - user.
b083ff9
to
b6f456a
Compare
FYI, @tvdeyen I'm waiting for feedback from you or others on the implementation of this before I finish it off. |
This pull request has not seen any activiy in a long time. |
This pull request has not seen any activiy in a long time. |
b6f456a
to
9318a2a
Compare
This pull request has not seen any activiy in a long time. |
4ea5c7d
to
19e4094
Compare
This pull request has not seen any activiy in a long time. |
This pull request has not seen any activiy in a long time. |
What is this pull request for?
Add a feature to enable restricting CMS users to specific languages. This applies to Site, Language, Page, and Node CMS functionality. This integrates with user roles to provide additional restrictions when used. Another PR to
alchemy-devise
will add additional functionality and UI specific to that Alchemy User implementation.User of this feature is optional and does not break any existing functionality.
Screenshots
See forthcoming
alchemy-devise
PR.Checklist