Skip to content

Allowing getResourceId to be string #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jurigag
Copy link

@Jurigag Jurigag commented Oct 23, 2015

Reason: i just wanted getResourceId to be generated on backend side.

@StyleT
Copy link
Owner

StyleT commented Oct 24, 2015

But why you can't pass to ACL something like this?

{
    id: 0,
    name: 'tst',
    resource: 'tst',
    getResourceId: function () {
        return this.resource;
    },
}

@Jurigag
Copy link
Author

Jurigag commented Oct 25, 2015

Well i can pass, but it will look bad on backend side imho.

@StyleT
Copy link
Owner

StyleT commented Oct 25, 2015

Hm, ok, if you have no "entity object" on JS side for all incoming data your changes are useful.
But you also should update JSDoc for AclResourceInterface and I'm not sure that it's possible to specify property here. And please update unit tests, they should cover case when resource object have property instead of callback.

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

Successfully merging this pull request may close these issues.

2 participants