# wp-parsely/3.24.2/src/content-helper/common/utils/permissions.ts

Parse.ly, version 3.24.2. 40 lines.

- Page: https://pluginprobe.com/plugins/wp-parsely/3.24.2/code/src/content-helper/common/utils/permissions.ts
- Raw: https://pluginprobe.com/plugins/wp-parsely/3.24.2/raw/src/content-helper/common/utils/permissions.ts
- Modified: 2025-07-08T13:46:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-parsely/3.24.2/code/src/content-helper/common/utils/permissions.ts#L10-L20`.

```typescript
/**
 * Defines the structure of a Content Intelligence Permissions object.
 *
 * @since 3.16.0
 */
export interface ContentHelperPermissions {
	ExcerptSuggestions: boolean;
	SmartLinking: boolean;
	TitleSuggestions: boolean;
	TrafficBoost: boolean;
}

/**
 * Returns the current user's permissions for Content Intelligence.
 *
 * @since 3.16.0
 *
 * @return {ContentHelperPermissions} The current user's permissions.
 */
export function getContentHelperPermissions(): ContentHelperPermissions {
	const defaultPermissions: ContentHelperPermissions = {
		ExcerptSuggestions: false,
		SmartLinking: false,
		TitleSuggestions: false,
		TrafficBoost: false,
	};

	try {
		const permissions = JSON.parse( window.wpParselyContentHelperPermissions );

		if ( 'object' !== typeof permissions || null === permissions ) {
			return defaultPermissions;
		}

		return permissions;
	} catch ( e ) {
		return defaultPermissions;
	}
}

```
