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

[Security] Autocomplete roles #431

Closed
shane-l opened this issue Jan 30, 2015 · 5 comments
Closed

[Security] Autocomplete roles #431

shane-l opened this issue Jan 30, 2015 · 5 comments
Labels

Comments

@shane-l
Copy link

shane-l commented Jan 30, 2015

Hi,

It'd be nice to autocomplete role names inside calls to is_granted. This would be built-in roles (IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, etc) as well as any custom roles defined in security.yml.

@Haehnchen
Copy link
Owner

good idea. but not only for twig files.
some compiled sources

also related to #412

    <parameter key="security.role_hierarchy.roles" type="collection">
      <parameter key="ROLE_ADMIN" type="collection">
        <parameter>ROLE_USER</parameter>
        <parameter>ROLE_foo</parameter>
      </parameter>
      <parameter key="ROLE_PARENT" type="collection">
        <parameter>ROLE_ADMIN</parameter>
      </parameter>
    </parameter>
    <service id="security.access_map" class="Symfony\Component\Security\Http\AccessMap" public="false">
      <call method="add">
        <argument type="service">
          <service class="Symfony\Component\HttpFoundation\RequestMatcher" public="false">
            <argument>^/login$</argument>
          </service>
        </argument>
        <argument type="collection">
          <argument>IS_AUTHENTICATED_ANONYMOUSLY</argument>
        </argument>
        <argument>null</argument>
      </call>

@Haehnchen Haehnchen changed the title Autocomplete roles inside is_granted [Security] Autocomplete roles Jan 30, 2015
@Koc
Copy link
Contributor

Koc commented Jan 30, 2015

It also relates #141. Imho much easier write custom symfony-command which generates JSON instead of writing parser on Java. Somewho of Symfony users can write this kind of command but only small part of Symfony users can code on Java.

@Haehnchen
Copy link
Owner

yes, its also came to my mind because custom twig completion possibilities already included in https://github.com/Haehnchen/idea-php-toolbox per json, but it needs some more improvements before a publish. moreover symfony2 plugin should provide completion on its own data, to make life easier for all "lazy developers" which wont configure several plugins.

@Koc
Copy link
Contributor

Koc commented Jan 31, 2015

IMHO it is not so hard install 3 plugins (annotations, php-toolbox, symfony2), one bundle and run 2-3 symfony commands. It can unweight you.

@Haehnchen Haehnchen added the todo label Nov 10, 2016
Haehnchen added a commit that referenced this issue Mar 4, 2017
Haehnchen added a commit that referenced this issue Mar 4, 2017
Haehnchen added a commit that referenced this issue Mar 5, 2017
@King2500
Copy link
Contributor

King2500 commented Mar 5, 2017

👍

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

No branches or pull requests

4 participants