How to reset K2 Workspace Permissions

Author by Steve Borgwardt

When I first started working with K2 about 4 years ago, I was working with the K2 Workspace and wanted to lock down some permissions on the management interface, since by default any user can open Workspace after installation.

I noticed a security menu to set Workspace permissions and decided to add some users to this section and you forgot to add an AD group or forget to include your user name you will get completely locked out of Workspace. Here are the steps to reset the K2 Workspace permissions:


Here is the SQL script to run against the K2 database:

Disclaimer: Please make a backup copy of your K2 database before performing this script.  This code is provided as is without warranty of any kind.


TRUNCATE TABLE [Workspace].[ActionPermission]

DELETE FROM [Workspace].[CategoryActionSiteMap] where sitemapid not in (select value from [Workspace].[Settings] where [key] = 'Sitemap2id' or [key] = 'defaultsitemap')

DELETE FROM [Workspace].[Sitemap] where id not in (select value from [Workspace].[Settings] where [key] = 'Sitemap2id' or [key] = 'defaultsitemap')

DELETE FROM [Workspace].[UserProfile]

You should now be able to access K2 Workspace again from the browser.

Please note that this resets all previous security permission settings.


Steve Borgwardt

Senior Application Developer