1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Pluggable Module Security

Pluggable Module Security

7 posts, 0 answered
  1. Shane
    Shane avatar
    3 posts
    Registered:
    23 Sep 2008
    06 Oct 2009
    Link to this post
    I am building a pluggable module and I have implemented security (SecuredModule, GlobalPermissions etc). I have also created my own rights different to that of CrudRights and have successfully modified the permissions view and the correct rights are saved to database in the sf_SecPerms table. However whilst I can access the module as an administrator and the permission settings for roles are saved and can be edited, if I log in under a different role the module does not appear in the navigation of modules. When the module is first initialised the manager holds the correct information on the roles and permissions within the SecurityRoots. What else do i need to do to get this working?

    I’m using Sitefinity 3.6 during development. Any ideas about what i might be missing?

    Thanks,
    Shane
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    06 Oct 2009
    Link to this post
    Hello Shane,

    Most probably there is some cache or you are returning a new instance of your Permission class (that inherits from SecuredBase) for the SecurityRoots. Thus the cache is lost and the permission take effect after restarting the application.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Shane
    Shane avatar
    3 posts
    Registered:
    23 Sep 2008
    06 Oct 2009
    Link to this post
    I don't believe thats is whats causing the problem. I have attached a test module with my implmentation as it stands at the moment with only minor adjustments and i get the same problem, where i can see the module as an admin but any other role can't see the module.

    Hope you can help.
  4. Shane
    Shane avatar
    3 posts
    Registered:
    23 Sep 2008
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Oct 2009
    Link to this post
    Hello Shane,

    Try modifying SecurityRoots as shown below:

     public static Dictionary<String, ISecured> SecurityRoots 
            { 
                get 
                { 
                    if (securityRoots == null
                    { 
                        securityRoots = new Dictionary<String, ISecured>(Manager.Providers.Count); 
                        foreach (string name in Manager.Providers.Keys) 
                            securityRoots.Add(name, new GlobalPermissions(name)); 
                    } 
                    return securityRoots; 
                } 
            } 


    Also we sent a reply to your support ticket. Please check it out it the suggestion here does not help.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Shane Leipper
    Shane Leipper avatar
    1 posts
    Registered:
    07 Oct 2009
    07 Oct 2009
    Link to this post
    I already had that in the manager class, although i copy and pasted to ensure but still no joy. From debuggin i know that the securityRoots does have the correct permissions grant and deny values from the database for the role i was evaluating. Since i am implementing custom rights with different values to that of crudrights do i need to do anything more with my implementation.

    Hope you can help.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Oct 2009
    Link to this post
    Hi Shane Leipper,

    The problem seems to be in the order of the properties in EcommerceRights. I sent a reply to your support ticket with a sample. Please let's keep discussing the issue there.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
7 posts, 0 answered