deleted useless import
commented rest endpoint in server.ts
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -96,6 +96,7 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
{ resource: Entity.PAYMENT_METHODS, action: Action.LIST, attributes: ['*'] },
{
resource: Entity.PAYMENT_METHOD, action: [Action.READ, Action.CREATE, Action.DELETE], attributes: ['*'],
+ // TODO - rewrite delete method to send also the current user so basic can only delete its payment methods
// condition: { Fn: 'EQUALS', args: { 'user': '$.owner' } }
},
]
@@ -124,6 +125,11 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
// resource: Entity.INVOICE, action: [Action.DOWNLOAD], attributes: ['*'],
// condition: { Fn: 'EQUALS', args: { 'user': '$.owner' } }
// },
+ // {
+ // resource: Entity.PAYMENT_METHOD, action: [Action.READ, Action.CREATE, Action.DELETE], attributes: ['*'],
+ // TODO - rewrite delete method to send also the current user so basic can only delete its payment methods
+ // condition: { Fn: 'EQUALS', args: { 'user': '$.owner' } }
+ // },
// -----------------------------------------------------------------------------------------------
{ resource: Entity.SITES, action: Action.LIST, attributes: ['*'] },
{ resource: Entity.SITE, action: Action.READ, attributes: ['*'] },
@@ -208,10 +214,6 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
condition: { Fn: 'EQUALS', args: { 'user': '$.owner' } }
},
{ resource: Entity.NOTIFICATION, action: Action.CREATE, attributes: ['*'] },
- {
- resource: Entity.PAYMENT_METHOD, action: [Action.READ, Action.CREATE, Action.DELETE], attributes: ['*'],
- condition: { Fn: 'EQUALS', args: { 'user': '$.owner' } }
- },
]
},
demo: {

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -453,5 +453,6 @@ export enum ServerRoute {
REST_TENANTS = 'tenants',
- REST_BILLING_PAYMENT_METHODS = 'billing/paymentmethods'
+ // shouldn't we have this rest here ?? for the route building
+ // REST_BILLING_PAYMENT_METHODS = 'billing/paymentmethods'
}

deleted useless import
commented rest endpoint in server.ts