Skip to content
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

Credentials in filters builder is not taked into account in all generated files #607

Open
sescandell opened this issue Jul 23, 2013 · 2 comments

Comments

@sescandell
Copy link
Member

If we have the following generator file:

filters:
        params:
            ...
            fields:
                ...
                product:
                    credentials: 'hasRole("ROLE_ADMIN")'

FiltersType will be well generated (taking into account credentials), but templates and actions will not.

I could simply bypass this error putting the credentials on global fields definition.

But, is it possible to imagine that, for a filter, credentials could be different from related field?

I currently have a workaround solving the template issue. But I didnt' notice before how processFilters function is deeply linked to ListBuilder.

Do you think this is a real issue we have to fix (just to know if I have to continue my fix)?

@ioleo
Copy link
Member

ioleo commented Jul 24, 2013

@sescandell I can imagine that you may want:

  • A can edit field
  • A, B, C can see field on list and filter by it

I'm not sure right now, how we currently handle this (no time to check at the moment), but here is how I think it should work:

  • if user has credentials to EDIT object
  • but does not have credentials for a certain column/field
  • then the generated form will not contain that field

E.g.

Basic user -> editing Category can see (and edit): user_comment field
Admin user -> editing Category can see (and edit): name, admin_comment fields

And in this example I'd like

Basic user -> not be able to edit admin_comment and name, but be able to filter by them

@sescandell
Copy link
Member Author

You right.

I'll try to find a fix for that so,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants