Skip to content

Allowing getResourceId to be string#3

Open
Jurigag wants to merge 1 commit into
StyleT:masterfrom
Jurigag:master
Open

Allowing getResourceId to be string#3
Jurigag wants to merge 1 commit into
StyleT:masterfrom
Jurigag:master

Conversation

@Jurigag

@Jurigag Jurigag commented Oct 23, 2015

Copy link
Copy Markdown

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

@StyleT

StyleT commented Oct 24, 2015

Copy link
Copy Markdown
Owner

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

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

@Jurigag

Jurigag commented Oct 25, 2015

Copy link
Copy Markdown
Author

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

@StyleT

StyleT commented Oct 25, 2015

Copy link
Copy Markdown
Owner

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