Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[SecurityBundle] fix service class by adding a parameter, on twig extension#2835

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromjuliendidier:twig-security-class
Dec 19, 2011
Merged

[SecurityBundle] fix service class by adding a parameter, on twig extension#2835

fabpot merged 1 commit intosymfony:masterfromjuliendidier:twig-security-class
Dec 19, 2011

Conversation

@juliendidier
Copy link
Contributor

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

To override the is_granted twig function, the class of TwigExtension is now set in a parameter.

@stof
Copy link
Member

First thing, you could overwrite the extension at the twig level by simply registering another twig extension with the samegetName method.

And second point, replacing core Twig functions is probably one of the best way to forbid you to use third party bundles as the change will also impact their code. Do you really need to do it (especially considering that this function simply calls the security context and all the logic is in the context) ?

@juliendidier
Copy link
ContributorAuthor

Yes, overridingis_granted function is probably a bad example. But having it set as parameter allow you to redefine it (if you know what you are doing).

fabpot added a commit that referenced this pull requestDec 19, 2011
Commits-------60ebaaa [SecurityBundle] fix service class by adding a parameter, on twig extensionDiscussion----------[SecurityBundle] fix service class by adding a parameter, on twig extensionBug fix: noFeature addition: noBackwards compatibility break: noSymfony2 tests pass: yesFixes the following tickets: -Todo: -To override the is_granted twig function, the class of TwigExtension is now set in a parameter.---------------------------------------------------------------------------by stof at 2011/12/10 10:38:38 -0800First thing, you could overwrite the extension at the twig level by simply registering another twig extension with the same ``getName`` method.And second point, replacing core Twig functions is probably one of the best way to forbid you to use third party bundles as the change will also impact their code. Do you really need to do it (especially considering that this function simply calls the security context and all the logic is in the context) ?---------------------------------------------------------------------------by juliendidier at 2011/12/10 15:43:08 -0800Yes, overriding ```is_granted``` function is probably a bad example. But having it set as parameter allow you to redefine it (if you know what you are doing).
@fabpotfabpot merged commit60ebaaa intosymfony:masterDec 19, 2011
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@juliendidier@stof@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp