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

Reimplement access checking as fetch function #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Reimplement access checking as fetch function #4

wants to merge 4 commits into from

Conversation

emodric
Copy link
Contributor

@emodric emodric commented Sep 14, 2011

Currently, only website_toolbar.tpl uses access checking to see if current user is allowed to use website toolbar per class.

There's no reason why website_toolbar_edit.tpl and website_toolbar_versionview.tpl templates don't use access checks.

To avoid code duplications, I've reimplemented access checking as fetch function to allow simple usage within all three templates.

@andrerom
Copy link
Contributor

There is another patch that might be more efficient as it uses the access check function from ezjscore, take a look and see what you think.
http://issues.ez.no/IssueView.php?Id=15510&activeItem=23

@emodric
Copy link
Contributor Author

emodric commented Sep 15, 2011

Both solutions look good to me. I can't really say which one is more efficient though.

I do fetch a content class to see if it really exists, but if you think there's no need for it, I can take it out.

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