From bf390b2ca21d46dd21b3185714dcbbde0f709b8f Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Wed, 10 Jul 2024 12:20:50 +0530 Subject: [PATCH 1/6] Add Notification Template API Resource --- .../resources/system-api-resource.xml | 33 ++++++++++++++++++ .../resources/system-api-resource.xml.j2 | 33 ++++++++++++++++++ .../resources/resource-access-control-v2.xml | 34 +++++++++++++++++++ .../resource-access-control-v2.xml.j2 | 34 +++++++++++++++++++ 4 files changed, 134 insertions(+) diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml index b59eb1bb0f23..f97ddff5cdf7 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml @@ -722,6 +722,39 @@ description="View email templates and types in the organization"/> + + + + + + + + + + + + + + + + + + diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 index 124f332302c0..401110b21cfd 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 @@ -731,6 +731,39 @@ description="View email templates and types in the organization"/> + + + + + + + + + + + + + + + + + + diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml index 0956d9d4fc23..af8a8201dee3 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml @@ -645,6 +645,40 @@ internal_email_mgt_delete + + + internal_org_email_mgt_view + + + internal_org_email_mgt_view + + + + + internal_email_mgt_view + + + internal_email_mgt_create + + + internal_email_mgt_update + + + internal_email_mgt_delete + + + internal_sms_mgt_view + + + internal_sms_mgt_create + + + internal_sms_mgt_update + + + internal_sms_mgt_delete + + diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 index 1fc33b46bb2d..78765701833f 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 @@ -694,6 +694,40 @@ internal_email_mgt_delete + + + internal_org_email_mgt_view + + + internal_org_email_mgt_view + + + + + internal_email_mgt_view + + + internal_email_mgt_create + + + internal_email_mgt_update + + + internal_email_mgt_delete + + + internal_sms_mgt_view + + + internal_sms_mgt_create + + + internal_sms_mgt_update + + + internal_sms_mgt_delete + + From 53d2ec4392fa5615ad299e823d311eadc5705646 Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Thu, 26 Sep 2024 22:26:35 +0530 Subject: [PATCH 2/6] Add Notification Template API Resource and Access Control --- .../resources/system-api-resource.xml.j2 | 33 +++++++++++++++++ .../resource-access-control-v2.xml.j2 | 35 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 index 494cf2b3ee61..c46220b09eea 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 @@ -778,6 +778,39 @@ description="View SMS templates and types in the organization"/> + + + + + + + + + + + + + + + + + + diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 index b6c17f9fd566..ddee836984dd 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 @@ -728,6 +728,41 @@ internal_sms_mgt_delete + + + + internal_org_notification_email_mgt_view + + + internal_org_notification_sms_mgt_view + + + + + internal_notification_email_mgt_view + + + internal_notification_email_mgt_create + + + internal_notification_email_mgt_update + + + internal_notification_email_mgt_delete + + + internal_notification_sms_mgt_view + + + internal_notification_sms_mgt_create + + + internal_notification_sms_mgt_update + + + internal_notification_sms_mgt_delete + + From bfcda1b44a37d049fd09c057973ad392e0a3bca3 Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Sun, 29 Sep 2024 19:11:10 +0530 Subject: [PATCH 3/6] Update Notification Template API Scopes --- .../resources/system-api-resource.xml.j2 | 63 +++---------------- .../resource-access-control-v2.xml.j2 | 55 +++------------- 2 files changed, 20 insertions(+), 98 deletions(-) diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 index c46220b09eea..3c87451e3763 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml.j2 @@ -749,55 +749,14 @@ identifier="/api/server/v(.*)/notification/(?:email|sms)/template-types" requiresAuthorization="true" description="API representation of the Notification Template Management API" type="TENANT"> - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - + - internal_org_email_mgt_view - - - internal_org_email_mgt_view - - - - - internal_email_mgt_view - - - internal_email_mgt_create - - - internal_email_mgt_update - - - internal_email_mgt_delete - - - internal_sms_mgt_view - - - internal_sms_mgt_create - - - internal_sms_mgt_update - - - internal_sms_mgt_delete - - - - - - internal_org_notification_email_mgt_view + internal_org_email_mgt_view,internal_org_template_mgt_view - internal_org_notification_sms_mgt_view + internal_org_template_mgt_view - internal_notification_email_mgt_view + internal_email_mgt_view,internal_template_mgt_view - internal_notification_email_mgt_create + internal_email_mgt_create,internal_template_mgt_create - internal_notification_email_mgt_update + internal_email_mgt_update,internal_template_mgt_update - internal_notification_email_mgt_delete + internal_email_mgt_delete,internal_template_mgt_delete - internal_notification_sms_mgt_view + internal_template_mgt_view - internal_notification_sms_mgt_create + internal_template_mgt_create - internal_notification_sms_mgt_update + internal_template_mgt_update - internal_notification_sms_mgt_delete + internal_template_mgt_delete From 1eef740661e39aaa967e82bbc6259d7e50134ea6 Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Tue, 15 Oct 2024 07:06:18 +0530 Subject: [PATCH 4/6] update scopes in resource files --- .../resources/system-api-resource.xml | 30 +++++++------------ .../resources/resource-access-control-v2.xml | 20 ++++++------- 2 files changed, 20 insertions(+), 30 deletions(-) diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml index 2f7800706dfc..f69973173b77 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml @@ -768,22 +768,14 @@ identifier="/api/server/v(.*)/notification/(?:email|sms)/template-types" requiresAuthorization="true" description="API representation of the Notification Template Management API" type="TENANT"> - - - - - - - - + + + + - - + - internal_org_email_mgt_view + internal_org_email_mgt_view,internal_org_template_mgt_view - internal_org_email_mgt_view + internal_org_template_mgt_view - internal_email_mgt_view + internal_email_mgt_view,internal_template_mgt_view - internal_email_mgt_create + internal_email_mgt_create,internal_template_mgt_create - internal_email_mgt_update + internal_email_mgt_update,internal_template_mgt_update - internal_email_mgt_delete + internal_email_mgt_delete,internal_template_mgt_delete - internal_sms_mgt_view + internal_template_mgt_view - internal_sms_mgt_create + internal_template_mgt_create - internal_sms_mgt_update + internal_template_mgt_update - internal_sms_mgt_delete + internal_template_mgt_delete From f01fcd86667c5447d02912b2c9e6adbf01d488da Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Fri, 18 Oct 2024 09:41:20 +0530 Subject: [PATCH 5/6] Add scopes for notification/reset-template-type endpoint --- .../resources/resource-access-control-v2.xml | 3 +++ .../resources/resource-access-control-v2.xml.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml index a70f4dad0acf..607f8cdf3746 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml @@ -678,6 +678,9 @@ internal_template_mgt_delete + + internal_template_mgt_delete + diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 index 4f45a4676bfb..08998327c58c 100644 --- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 +++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/resource-access-control-v2.xml.j2 @@ -727,6 +727,9 @@ internal_template_mgt_delete + + internal_template_mgt_delete + From 157dbbbece3c59104bd1b769e15af04932a07717 Mon Sep 17 00:00:00 2001 From: rushannanayakkara Date: Fri, 18 Oct 2024 09:50:08 +0530 Subject: [PATCH 6/6] Fix typo in scope description --- .../resources/system-api-resource.xml | 2 +- .../resources/system-api-resource.xml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml index f69973173b77..e6357f633782 100644 --- a/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml +++ b/features/api-resource-mgt/org.wso2.carbon.identity.api.resource.mgt.server.feature/resources/system-api-resource.xml @@ -771,7 +771,7 @@ + description="Create new notification templates and types in the organization (root)"/> + description="Create new notification templates and types in the organization (root)"/>