Skip to content

Commit

Permalink
Merge pull request #4466 from alkem-io/develop
Browse files Browse the repository at this point in the history
v0.89.0
  • Loading branch information
hero101 authored Aug 26, 2024
2 parents 975a355 + 3caf678 commit e94effd
Show file tree
Hide file tree
Showing 197 changed files with 3,200 additions and 2,603 deletions.
124 changes: 2 additions & 122 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-server",
"version": "0.88.2",
"version": "0.89.0",
"description": "Alkemio server, responsible for managing the shared Alkemio platform",
"author": "Alkemio Foundation",
"private": false,
Expand Down Expand Up @@ -42,6 +42,7 @@
"migration:revert": "npm run typeorm-no-entities migration:revert",
"migration:show": "npm run typeorm migration:show",
"migration:validate": "./.scripts/migrations/run_validate_migration.sh",
"circular-dependencies": "madge --circular dist",
"db:recreate": "ts-node .scripts/tests/recreate-db.ts",
"db:reset": "npm run db:recreate && npm run migration:run"
},
Expand Down Expand Up @@ -86,7 +87,6 @@
"cookie-parser": "^1.4.6",
"cross-env": "^7.0.3",
"dataloader": "^2.2.2",
"file-type": "^19.1.1",
"graphql": "^16.9.0",
"graphql-amqp-subscriptions": "^2.0.0",
"graphql-subscriptions": "^2.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { PlatformModule } from '@platform/platfrom/platform.module';
import { ContributionReporterModule } from '@services/external/elasticsearch/contribution-reporter';
import { DataLoaderInterceptor } from '@core/dataloader/interceptors';
import { InnovationHubInterceptor } from '@common/interceptors';
import { InnovationHubModule } from '@domain/innovation-hub';
import { InnovationHubModule } from '@domain/innovation-hub/innovation.hub.module';
import { SsiCredentialFlowController } from '@services/api-rest/ssi-credential-flow/ssi.credential.flow.controller';
import { SsiCredentialFlowModule } from '@services/api-rest/ssi-credential-flow/ssi.credential.flow.module';
import { StorageAccessModule } from '@services/api-rest/storage-access/storage.access.module';
Expand Down Expand Up @@ -79,6 +79,8 @@ import { FileIntegrationModule } from '@services/file-integration';
import { AdminLicensingModule } from '@platform/admin/licensing/admin.licensing.module';
import { PlatformRoleModule } from '@platform/platfrom.role/platform.role.module';
import { LookupByNameModule } from '@services/api/lookup-by-name';
import { PlatformHubModule } from '@platform/platfrom.hub/platform.hub.module';
import { AdminContributorsModule } from '@platform/admin/avatars/admin.avatar.module';

@Module({
imports: [
Expand Down Expand Up @@ -238,6 +240,7 @@ import { LookupByNameModule } from '@services/api/lookup-by-name';
ActivityLogModule,
RolesModule,
KonfigModule,
AdminContributorsModule,
AdminCommunicationModule,
AdminSearchIngestModule,
AdminLicensingModule,
Expand All @@ -250,6 +253,7 @@ import { LookupByNameModule } from '@services/api/lookup-by-name';
LibraryModule,
PlatformModule,
PlatformRoleModule,
PlatformHubModule,
ContributionMoveModule,
GeoLocationModule,
ContributionReporterModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export const CREDENTIAL_RULE_TYPES_ACCOUNT_AUTHORIZATION_RESET =
'credentialRuleTypes-accountAuthorizationReset';
export const CREDENTIAL_RULE_TYPES_ACCOUNT_MANAGE =
'credentialRuleTypes-accountManage';
export const CREDENTIAL_RULE_TYPES_ACCOUNT_RESOURCES_MANAGE =
'credentialRuleTypes-accountResourcesManage';
export const CREDENTIAL_RULE_TYPES_ACCOUNT_CHILD_ENTITIES =
'credentialRuleTypes-accountChildEntities';
export const CREDENTIAL_RULE_TYPES_SPACE_GLOBAL_COMMUNITY_READ =
Expand Down
2 changes: 0 additions & 2 deletions src/common/enums/authorization.credential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export enum AuthorizationCredential {

USER_SELF_MANAGEMENT = 'user-self', // able to update a user

ACCOUNT_HOST = 'account-host',

SPACE_ADMIN = 'space-admin',
SPACE_MEMBER = 'space-member',
SPACE_LEAD = 'space-lead',
Expand Down
2 changes: 1 addition & 1 deletion src/common/enums/authorization.policy.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export enum AuthorizationPolicyType {
CALENDAR = 'calendar',
CALENDAR_EVENT = 'calendar-event',
TIMELINE = 'timeline',

IN_MEMORY = 'in-memory',
LICENSING = 'licensing',
UNKNOWN = 'unknown',
AI_PERSONA_SERVICE = 'ai-persona-service',
}
Expand Down
3 changes: 3 additions & 0 deletions src/common/enums/authorization.privilege.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export enum AuthorizationPrivilege {
CREATE_SUBSPACE = 'create-subspace',
CREATE_ORGANIZATION = 'create-organization',
CREATE_VIRTUAL_CONTRIBUTOR = 'create-virtual-contributor',
CREATE_INNOVATION_PACK = 'create-innovation-pack',
CREATE_INNOVATION_HUB = 'create-innovation-hub',
FILE_UPLOAD = 'file-upload',
FILE_DELETE = 'file-delete',
UPDATE_WHITEBOARD = 'update-whiteboard',
Expand All @@ -43,6 +45,7 @@ export enum AuthorizationPrivilege {
ACCESS_DASHBOARD_REFRESH = 'access-dashboard-refresh',
UPDATE_CONTENT = 'update-content',
SAVE_AS_TEMPLATE = 'save-as-template',
TRANSFER_RESOURCE = 'transfer-resource',
}

registerEnumType(AuthorizationPrivilege, {
Expand Down
2 changes: 1 addition & 1 deletion src/common/interceptors/innovation.hub.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { GqlExecutionContext } from '@nestjs/graphql';
import { INNOVATION_HUB_INJECT_TOKEN } from '@common/constants';
import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston';
import { LogContext } from '@common/enums';
import { InnovationHubService } from '@domain/innovation-hub';
import { InnovationHubService } from '@domain/innovation-hub/innovation.hub.service';
import { DOMAIN_PATTERN, SUBDOMAIN_PATTERN } from '@core/validation';
import { AlkemioConfig } from '@src/types';

Expand Down
18 changes: 0 additions & 18 deletions src/common/utils/url.to.buffer.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/core/authorization/authorization.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class AuthorizationService {

if (this.isAccessGranted(agentInfo, auth, privilegeRequired)) return true;

const errorMsg = `Authorization: unable to grant '${privilegeRequired}' privilege: ${msg} user: ${agentInfo.userID}`;
const errorMsg = `Authorization: unable to grant '${privilegeRequired}' privilege: ${msg} user: ${agentInfo.userID} on authorization of type '${auth.type}'`;
this.logCredentialCheckFailDetails(errorMsg, agentInfo, auth);
// If you get to here then no match was found
throw new ForbiddenAuthorizationPolicyException(
Expand Down
Loading

0 comments on commit e94effd

Please sign in to comment.