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

v4: Rewrite acl.md #2086

Closed
niden opened this Issue Jan 12, 2019 · 6 comments

Comments

3 participants
@niden
Copy link
Member

niden commented Jan 12, 2019

@niden niden self-assigned this Jan 12, 2019

@niden niden added this to ToDo in 4.0 Documentation Jan 12, 2019

@niden niden moved this from ToDo to In Progress in 4.0 Documentation Jan 12, 2019

@niden niden moved this from In Progress to Verify in 4.0 Documentation Jan 16, 2019

@niden

This comment has been minimized.

Copy link
Member

niden commented Jan 16, 2019

cc @CameronHall @ruudboon

Comments and review please :)

@CameronHall

This comment has been minimized.

Copy link
Member

CameronHall commented Jan 16, 2019

Fantastic! Love the working example. I'm not sure how the docs work but can we add a small margin (the width of a tab) to all the code blocks? The single lines look silly with the code hugging the left border.

I'd also like to suggest a couple of small changes to the wording.

This is the most important step in the operation since a small mistake here can provide allow access to operations for subjects for subjects to operations that the developer does not intend to.

To tie Operations and Subjects together we use the allow() and deny() methods exposed by the Phalcon\Acl\Memory class exposes.

Please be VERY careful when using the * wildcard. It is very easy to make a mistake to happen and the wildcard, although it seems convenient for certain instances, it may allow allowing users to access areas of your application that they are not supposed to.

Now that the callable is defined in the ACL, we will need to call the isAllowed() method with an array as the fourth parameter:

The fourth parameter must be an array. Each array element represents a parameter that your anonymous function accepts. The key of the element is the name of the parameter, while the value is what will be passed as the value of that the parameter of to the function.

@niden

This comment has been minimized.

Copy link
Member

niden commented Jan 16, 2019

@CameronHall We can work on the styling adjustments. That comes from the markdown highlighter I think so it won't be difficult to pick up.

PRs go to this repo for the en language. PRs for styling go to the docs-app repo.

I made these changes and ACL should be done.

@ruudboon

This comment has been minimized.

Copy link

ruudboon commented Jan 16, 2019

@niden Well written en great practical examples! Some styling could be improved. Let's wait for the new header and I will create some pulls for that.

Would it be an idea to link to a Vokuro/Other demo apps to see a real life example?

@niden

This comment has been minimized.

Copy link
Member

niden commented Jan 16, 2019

@ruudboon Yes we can link those apps. The problem is that they are not updated yet so we cannot do that for now. The idea is that this use case will be one tutorial application

@niden

This comment has been minimized.

Copy link
Member

niden commented Jan 16, 2019

Closing this one

@niden niden closed this Jan 16, 2019

@niden niden moved this from Verify to Done in 4.0 Documentation Jan 16, 2019

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