Skip to content

Improve the ACL matching algorithm - #214

Merged
raymondfeng merged 2 commits into
masterfrom
feature/fix-acl-order
Mar 20, 2014
Merged

raymondfeng merged 2 commits into
masterfrom
feature/fix-acl-order

Conversation

@raymondfeng

Copy link
Copy Markdown
Member

@slnode

slnode commented Mar 19, 2014

Copy link
Copy Markdown

All is well
Refer to this link for build results: http://ci.strongloop.com/job/loopback/1018/

Comment thread lib/models/acl.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these wrapped in debug.enabled?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good practice to check the flag to avoid any calculations such as string concatenation on the parameters of the debug().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sure. But all of those are O(1)... so a bit premature optimization IMO. Not worried about it just curious.

@ritch

ritch commented Mar 19, 2014

Copy link
Copy Markdown
Member

Only a couple minor comments. Overall I'm assume this catches an odd case in the weighting algorithm. To improve this we should document the algorithm a bit more clearly and so a user can easily understand it.

I also think we really need the ability to drop down into a simple function based access control. Perhaps should be the base for ACL2.

@slnode

slnode commented Mar 19, 2014

Copy link
Copy Markdown

All is well
Refer to this link for build results: http://ci.strongloop.com/job/loopback/1019/

@ritch

ritch commented Mar 20, 2014

Copy link
Copy Markdown
Member

LGTM 👍

raymondfeng added a commit that referenced this pull request Mar 20, 2014
@raymondfeng
raymondfeng merged commit 44a39af into master Mar 20, 2014
@raymondfeng
raymondfeng deleted the feature/fix-acl-order branch March 20, 2014 00:02
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.

3 participants