Results 1 to 3 of 3

Thread: Role based secuirty plugin

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Vote Rating

    Default Role based secuirty plugin

    I created a role based security plugin that renders the components based on the users roles.

    It works by looking for a roles property in the configuration object and it will also look at the items for the config object and remove the configuration for the component if the users doesn't have the current permissions.

    You have to initialize the object with what roles the users has.

    Code: = ['my', 'user', 'roles'];
    Then to have the render process an object config you do:

    Code:{roles: ['role1', 'role2']});
    the roles property can either be a list of roles or a single role. The render will also accept an array of config objects.

    The unit test contain a lot of examples on how the render works.

    Here is the github project page:

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Nice idea. I haven't looked at your code but I have a quick suggestion. When you name a project, you should call it by the class name. And class names should have a descriptive naming convention. Since I develop for both ExtJS and Sencha Touch this is what I do:


    This is an example:


    ClassName should be UpperCamelCase.

    Just merely a suggestion.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2011
    Vote Rating

    Default is the instance of the class that handles the security. The name of the class is Ext.ux.SecurityRenderController. The code should work withe sencha touch as well as extjs 3.x and 4.x.

    What should I name it since it works in both sench touch and extjs?

Similar Threads

  1. Replies: 35
    Last Post: 5 Dec 2012, 6:57 AM
  2. A sencha-touch based theme plugin for WordPress: first working alpha
    By sandro.paganotti in forum Sencha Touch 1.x: Examples and Showcases
    Replies: 4
    Last Post: 4 Sep 2010, 6:15 AM
  3. Role-based security and widget visualization
    By KaiWeing in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 2 Jul 2010, 7:03 AM
  4. ExtJS and role based UI
    By Whatty in forum Community Discussion
    Replies: 8
    Last Post: 21 Nov 2009, 5:00 AM
  5. How to dynamically make grid columns editable based on user role?
    By wgpubs in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 4 Dec 2008, 8:33 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts