Why are the results different on Permission Check for my Custom Application?


the permission check is not what I expected.. so for an owner, both of these checks are true. but for say Manager, given the Can Create Map App permission is changed from the default, check1 returns false, check2 returns true.
Should the results both be true?

 public boolCanCreate(int userId, Guid containerTypeId, Guid containerId){
              PermissionCheck check1 = TEApi.Permissions.Get(UI.Permissions.MapAppPermissionRegistrar.CreateGroupMapApps, userId );
              PermissionCheck check2 = TEApi.Permissions.Get(UI.Permissions.MapAppPermissionRegistrar.CreateGroupMapApps, userId,containerId,containerTypeId, _entityPermissionType );
 
            return check1.IsAllowed || check2.IsAllowed;  
            
        }


a related post is here

heads up to     

Parents
  • Are you on version 9?   There is no permission API that takes container Ids, its going to be the content or the application.   If you are on version 9 there is a secondary issue in the fact your version is not  supported any more and a new version of the permissions API was added in version 11.   I highly recommend upgrading

  • yes.. afraid I am on 9.x so... I keep telling my people... 
    Looking forward to upgrading, hope your sales team is letting our leadership know we need to upgrade too.
    we're up on our license, so there's not reason to not upgrade.

    I totally get it.  I understand it maybe too much to ask. you already saved us with your last post. thank you for that.

    The overloads allowed for 'entityId' and entityTypeId, and then the entityPermissionType is application or content, so I using the application enum value option.. 


    I didn't know what an entity could be... 

    since the method is check if the user can create an application, there is not an application Id yet.  But I'll try passing null values see if it's just the application enum value that returns true.

Reply
  • yes.. afraid I am on 9.x so... I keep telling my people... 
    Looking forward to upgrading, hope your sales team is letting our leadership know we need to upgrade too.
    we're up on our license, so there's not reason to not upgrade.

    I totally get it.  I understand it maybe too much to ask. you already saved us with your last post. thank you for that.

    The overloads allowed for 'entityId' and entityTypeId, and then the entityPermissionType is application or content, so I using the application enum value option.. 


    I didn't know what an entity could be... 

    since the method is check if the user can create an application, there is not an application Id yet.  But I'll try passing null values see if it's just the application enum value that returns true.

Children