[Progress Communities] [Progress OpenEdge ABL] Forum Post: Permissions granted though not visible in backend

Status
Not open for further replies.
K

Kaibear

Guest
And again I am asking for the permissions system.... It is outrageous, complicated and just plain annoying how it acts. I created 3 webservices. Each service creates a role, grants permissions to that role, adds a user and assign the role to the user. We have n many instances of Sitefinity running, that's why I am TRYING to use a script to set these users up. My first problem was giving permissions to: Blogs, Blogposts, Lists and ListItems. I always got null pointer references when executing the service. But not conistently. And only for these 4 modules. The first instance doing the service works fine but the second (literally identically set up) throws the error. An IIS restart solved the situation but the instance after that again gave me a null pointer. For blogs, I noticed, that as soon as I added a blog into the site, it works again?! Why? So coding is obviously not the issue here. Second issue: I gave permissions to view, modify etc for Templates. But as soon as I login as the user, the module for Design is not shown. Why? And here goes the third: private void CreatePagesPermissions(string role) { string transactionName = "PagePermissions"; PageManager pageMgr = PageManager.GetManager(); string permSet = SecurityConstants.Sets.Pages.SetName; Permission pagePerm = pageMgr.CreatePermission( permSet, pageMgr.GetSecurityRoot(false).Id, GetRole(role).Id); pagePerm.GrantActions( false, SecurityConstants.Sets.Pages.Create, SecurityConstants.Sets.Pages.Modify, SecurityConstants.Sets.Pages.View, SecurityConstants.Sets.Pages.EditContent, SecurityConstants.Sets.Pages.CreateChildControls ); pageMgr.AddPermissionToObject(pageMgr.GetSecurityRoot(false), pagePerm, transactionName); PageNode page = pageMgr.GetPageNodes().FirstOrDefault(p => p.Title == "Pages"); Permission pageNodePer = pageMgr.CreatePermission( permSet, page.Id, GetRole(role).Id); pageNodePer.GrantActions( false, SecurityConstants.Sets.Pages.Create, SecurityConstants.Sets.Pages.Modify, SecurityConstants.Sets.Pages.View, SecurityConstants.Sets.Pages.EditContent, SecurityConstants.Sets.Pages.CreateChildControls ); pageMgr.AddPermissionToObject(page, pageNodePer, transactionName); TransactionManager.CommitTransaction(transactionName); pageMgr.SaveChanges(); } This should normally give the user with this permission access to the pages and ability to edit pages. But it does not. I can view the pages but cannot edit any. Why?

Continue reading...
 
Status
Not open for further replies.
Top