Skip to main content

Configuration

Plugin options

OptionTypeDefaultDescription
user_uidstringResolved from Better AuthThe UID of the content type that represents your users. Used to count role members and reassign users when a role is deleted.

Setting the user content type

If you are not using Better Auth, you need to tell the plugin which content type represents your users by setting user_uid.

config/plugins.ts
export default {
'api-permissions': {
enabled: true,
config: {
user_uid: 'plugin::users-permissions.user',
},
},
};

Replace 'plugin::users-permissions.user' with the UID of your actual user content type. For example:

Auth provideruser_uid
Strapi Users & Permissionsplugin::users-permissions.user
Custom pluginplugin::my-auth.user
Custom APIapi::user.user

Using with Better Auth

When Better Auth is installed, user_uid is resolved automatically to plugin::better-auth.user. No user_uid configuration is needed.

config/plugins.ts
export default {
'better-auth': {
enabled: true,
},
'api-permissions': {
enabled: true,
// No user_uid needed — resolved automatically
},
};