Skip to content

Commit

Permalink
Merge branch 'next' of github.com:webiny/webiny-js into next
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Mar 26, 2024
2 parents fcb7643 + fa56f2a commit b11d5db
Show file tree
Hide file tree
Showing 180 changed files with 3,082 additions and 2,822 deletions.
21 changes: 0 additions & 21 deletions packages/api-admin-users-cognito-so-ddb/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-admin-users-cognito-so-ddb/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-admin-users-cognito-so-ddb/index.js

This file was deleted.

18 changes: 0 additions & 18 deletions packages/api-admin-users-cognito-so-ddb/package.json

This file was deleted.

21 changes: 0 additions & 21 deletions packages/api-admin-users-cognito/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-admin-users-cognito/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/api-admin-users-cognito/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/api-admin-users-cognito/package.json

This file was deleted.

30 changes: 0 additions & 30 deletions packages/api-headless-cms/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import { createModelsCrud } from "~/crud/contentModel.crud";
import { createContentEntryCrud } from "~/crud/contentEntry.crud";
import { StorageOperationsCmsModelPlugin } from "~/plugins";
import { createCmsModelFieldConvertersAttachFactory } from "~/utils/converters/valueKeyStorageConverter";
import { ModelsPermissions } from "~/utils/permissions/ModelsPermissions";
import { ModelGroupsPermissions } from "./utils/permissions/ModelGroupsPermissions";
import { EntriesPermissions } from "./utils/permissions/EntriesPermissions";
import { createExportCrud } from "~/export";
import { createImportCrud } from "~/export/crud/importing";

Expand Down Expand Up @@ -63,25 +60,6 @@ export const createContextPlugin = ({ storageOperations }: CrudParams) => {
await context.benchmark.measure("headlessCms.createContext", async () => {
await storageOperations.beforeInit(context);

const modelGroupsPermissions = new ModelGroupsPermissions({
getIdentity: context.security.getIdentity,
getPermissions: () => context.security.getPermissions("cms.contentModelGroup"),
fullAccessPermissionName: "cms.*"
});

const modelsPermissions = new ModelsPermissions({
getIdentity: context.security.getIdentity,
getPermissions: () => context.security.getPermissions("cms.contentModel"),
fullAccessPermissionName: "cms.*",
modelGroupsPermissions
});

const entriesPermissions = new EntriesPermissions({
getIdentity: context.security.getIdentity,
getPermissions: () => context.security.getPermissions("cms.contentEntry"),
fullAccessPermissionName: "cms.*"
});

const accessControl = new AccessControl({
getIdentity: context.security.getIdentity,
getGroupsPermissions: () =>
Expand All @@ -103,14 +81,6 @@ export const createContextPlugin = ({ storageOperations }: CrudParams) => {
PREVIEW: type === "preview",
MANAGE: type === "manage",
storageOperations,

// TODO: remove with 5.40 release.
permissions: {
groups: modelGroupsPermissions,
models: modelsPermissions,
entries: entriesPermissions
},

accessControl,
...createSystemCrud({
context,
Expand Down
16 changes: 0 additions & 16 deletions packages/api-headless-cms/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@ import { Topic } from "@webiny/pubsub/types";
import { CmsModelConverterCallable } from "~/utils/converters/ConverterCollection";
import { HeadlessCmsExport, HeadlessCmsImport } from "~/export/types";
import { AccessControl } from "~/crud/AccessControl/AccessControl";
import { ModelGroupsPermissions } from "~/utils/permissions/ModelGroupsPermissions";
import { ModelsPermissions } from "~/utils/permissions/ModelsPermissions";
import { EntriesPermissions } from "~/utils/permissions/EntriesPermissions";

export type ApiEndpoint = "manage" | "preview" | "read";

interface HeadlessCmsPermissions {
groups: ModelGroupsPermissions;
models: ModelsPermissions;
entries: EntriesPermissions;
}

export interface HeadlessCms
extends CmsSystemContext,
CmsGroupContext,
Expand Down Expand Up @@ -63,13 +54,6 @@ export interface HeadlessCms
*/
accessControl: AccessControl;

/**
* Permissions for groups, models and entries.
* @internal
* @deprecated Will be removed with the 5.40.0 release. Use `accessControl` instead.
*/
permissions: HeadlessCmsPermissions;

/**
* Export operations.
*/
Expand Down

This file was deleted.

This file was deleted.

113 changes: 0 additions & 113 deletions packages/api-headless-cms/src/utils/permissions/ModelsPermissions.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/api-i18n/src/graphql/crud/locales.crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ export const createLocalesCrud = (params: CreateLocalesCrudParams): LocalesCRUD
);

return {
/**
* Deprecated in 5.34.0
*/
onBeforeCreate: onLocaleBeforeCreate,
onAfterCreate: onLocaleAfterCreate,
onBeforeUpdate: onLocaleBeforeUpdate,
onAfterUpdate: onLocaleAfterUpdate,
onBeforeDelete: onLocaleBeforeDelete,
onAfterDelete: onLocaleAfterDelete,
/**
* Introduced in 5.34.0
*/
onLocaleBeforeCreate,
onLocaleAfterCreate,
onLocaleBeforeUpdate,
Expand Down
8 changes: 0 additions & 8 deletions packages/api-i18n/src/graphql/crud/system.crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ export const createSystemCrud = (params: CreateSystemCrudParams): SystemCRUD =>
);

return {
/**
* Deprecated in 5.34.0
*/
onBeforeInstall: onSystemBeforeInstall,
onAfterInstall: onSystemAfterInstall,
/**
* Introduced in 5.34.0
*/
onSystemBeforeInstall,
onSystemAfterInstall,
storageOperations,
Expand Down
Loading

0 comments on commit b11d5db

Please sign in to comment.