mirror of
https://github.com/strapi/strapi.git
synced 2025-09-15 03:27:19 +00:00
[content-manager] types for permissions service (#19015)
This commit is contained in:
parent
46e6ffbb44
commit
6f2783dadd
@ -1,9 +1,17 @@
|
|||||||
import { prop } from 'lodash/fp';
|
import { prop } from 'lodash/fp';
|
||||||
import { contentTypes as contentTypesUtils } from '@strapi/utils';
|
import { contentTypes as contentTypesUtils } from '@strapi/utils';
|
||||||
|
import { LoadedStrapi as Strapi, Schema } from '@strapi/types';
|
||||||
|
|
||||||
import { getService } from '../utils';
|
import { getService } from '../utils';
|
||||||
|
|
||||||
export default ({ strapi }: any) => ({
|
export default ({ strapi }: { strapi: Strapi }) => ({
|
||||||
canConfigureContentType({ userAbility, contentType }: any) {
|
canConfigureContentType({
|
||||||
|
userAbility,
|
||||||
|
contentType,
|
||||||
|
}: {
|
||||||
|
userAbility: any;
|
||||||
|
contentType: Schema.ContentType;
|
||||||
|
}) {
|
||||||
const action = contentTypesUtils.isSingleType(contentType)
|
const action = contentTypesUtils.isSingleType(contentType)
|
||||||
? 'plugin::content-manager.single-types.configure-view'
|
? 'plugin::content-manager.single-types.configure-view'
|
||||||
: 'plugin::content-manager.collection-types.configure-view';
|
: 'plugin::content-manager.collection-types.configure-view';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user