Issues with Permissions/Security implementation

Posted by Community Admin on 04-Aug-2018 17:10

Issues with Permissions/Security implementation

All Replies

Posted by Community Admin on 03-Apr-2012 00:00

Hello,
I've been attempting to implement security into my module for a couple of days now, and running into issues, which seems to be the norm with the latest version of SF and me. 

First off, a bunch of "Comments" permissions are being applied to my module, despite my taking those permission set references out of my module, removing my module from SF, restarting the app, then re-installing the module. There were numerous references to "SecurityConstants.Sets.Comments.SetName" in my supportedPermissionsSets string arrays, which I have since removed, as well as the assignment of the comments permissions from the "SetRootPermissions" method in my modules DataProvider class, but these comments permissions are still showing up. I've removed and reinstalled this module so many times today alone that I've lost count, and I've certainly tried this after removing those references in my solution, but the comments permissions are still showing up.

Secondly, when I had my resourceClassID referenced in my permission names, I was constantly told it could not find the resource class specified. The class is called LocationsResources, and it exists in the Locations namespace. I had defined it as typeof(LocationsResources).Name programtically (which showed in my Security.Config as LocationResources) when passing it to my permissions, but, I kept getting that issue so I finally removed all references to the resource file. Both the key it was looking for "ViewLocations" and the ResourceClassID were accurate, so what might be causing that issue? This issue also came up in the Workflows section, which tells me something must be wrong with my resource class, but I can't tell what. Here's my class decorator:

[ObjectInfo(typeof(LocationsResources), ResourceClassId="LocationsResources", Title = "LocationResourcesTitle", Description = "LocationResourcesDescription")]
    public class LocationsResources : Resource

Thirdly, I'm having issues with publishing. I have another thread about that, but, I have a separate issue I'll explain here. When trying to publish as a non "Administrator" user, who has the "LocationsAdmin" role (which has the permission to create, modify and delete Locations), and have two workflows in the "Workflows" section of sitefinity, one relating to all page content aside from my modules, and one separately for my Locations, called "LocationsWorkflow". The LocationsWorkflow has "LocationsAdmin" as it's "approver". However, trying to publish things from my LocationsModule (where it's working as the admin) does not work if I am a user with the "LocationsAdmin" role. I am told that the workflow doesn't support it (Workflow rules do not allow to publish). I don't understand why this user cannot publish.

Any help would be greatly appreciated.

full disclosure: I edited this post to remove an issue I had that was simply my own misunderstanding

Posted by Community Admin on 06-Apr-2012 00:00

No headway on issues 1 or 3, but, issue 2 was caused by the absence of this line in my module's install method:

Res.RegisterResource<LocationsResources>();

This thread is closed