Please follow the steps below:
- Run the following query, and note down the RoleID and PortalID.
SELECT * FROM Roles R
INNER JOIN PortalAlias PA
ON R.portalid = PA.PortalID
- Run the following query, and note down the PermissionID.
SELECT * FROM Permissions
- Run the following query, and note down the TabID.
Replace # with the PortalID and the 'test' with the page name:
SELECT *
FROM tabs
WHERE portalid = #
AND tabname = 'test'
- Update the
TabPermission
table by running the following query with the information you have gathered.
Replace the # signs with the relevant IDs.
DECLARE @RoleID AS INT = #
DECLARE @TabID AS INT = #
DECLARE @PermissionID AS INT = #
IF NOT EXISTS (SELECT * FROM [TabPermission] WHERE Roleid= @RoleID and PermissionID = @PermissionID)
BEGIN
INSERT INTO [dbo].[TabPermission]
([TabID]
,[PermissionID]
,[AllowAccess]
,[RoleID])
VALUES
(@TabID
,@PermissionID
,1
,@RoleID)
END
Comments
0 comments
Please sign in to leave a comment.