-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
AdminsController
currently handles CRUD for Organization
model which is a mismatch of resource, this should be refactored
#326
Comments
Hello @armahillo! I read about Active Admin. |
@IlinDmitry Hello! I think AA would add more complexity than we need; but if you want to do this and keep it simple, basic rails scaffolds would probably be fine for the Controller/Views, so long as authorization is added. :) |
@armahillo, hi. |
Oh definitely wait until that gets merged in before using it. It's a pretty
big refactor
…On Mon, May 14, 2018, 10:12 AM Dmitry ***@***.***> wrote:
@armahillo <https://github.com/armahillo>, hi.
I see that CanonicalItem is only in your branch 314-item-refactor.
Should i use it, or better wait untill you'll merge into master?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#326 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeqW-SHBnmFcrEDtJsJCXei4fOoDqYYks5tyZDUgaJpZM4T6w6r>
.
|
@IlinDmitry OK #314 has been merged into master - if you're still interested in working on this one, it's ready to be worked on. :) |
@armahillo, hi! User with superadmin rights can edit/delete only for models, that belongs to his organization or for all organizations? |
@IlinDmitry You're definitely going in the right direction. Non-Admins should still be able to edit/update their own organization, and users should be able to update their own records (I saw that both Organizations and Users had been moved into the Admin namespace, which is fine, but the Admin namespace actions should be more global, and the non-Admin ones should be scoped down to only what the user needs to be able to see). Re: Barcodes SuperAdmins should be able to do CRUD actions on the models I mention in the original post. Does this make sense? |
@IlinDmitry Hello! Have you been able to work on this at all? If not, push up any latest changes and one of us can take it over, IIRC you've got exciting family stuff happening right now :) Let me know! |
WIP Fixes #326 Admins Controller, namespaced separately
/app/controllers/admins_controller.rb
has CRUD actions for maintainingOrganization
records.Instead, we should create an
admin
namespace, set up authorization there (theUser
model already hasis_super_admin?
) and then create anorganizations_controller.rb
within it that performs these actions. We can also set up Admin CRUD forCanonicaltem
,Users
, andBarcodeItem
.User Interface for BarcodeAdmin
Admin::BarcodeItems#index
is global only (we will likely need to addwill_paginate
)The text was updated successfully, but these errors were encountered: