Skip to content

Commit

Permalink
Scenes management: Fix access on CopyScene
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Dec 16, 2024
1 parent 0b11911 commit 374fa2d
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4010,7 +4010,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for monitoring HEPA filters in a device */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2879,7 +2879,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** An interface to a generic way to secure a door */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2438,7 +2438,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2438,7 +2438,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/qpg/zap/switch.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for controlling the color properties of a color-capable light. */
Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** An interface to a generic way to secure a door */
Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** An interface to a generic way to secure a door */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** An interface to a generic way to secure a door */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
0x00000062, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
0x00000201, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \
0xFFF1FC06, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \
0xFFF1FC06, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \
Expand Down Expand Up @@ -452,6 +453,7 @@
0x00000002, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
0x00000003, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
0x00000004, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
0x00000040, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
0x000000FE, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \
0x00000000, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \
0x00000001, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \
Expand Down Expand Up @@ -503,6 +505,7 @@
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Thermostat, Command: AtomicRequest, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Fault Injection, Command: FailAtFault, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Fault Injection, Command: FailRandomlyAtFault, Privilege: manage */ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
0x00000062, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
0x00000062, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
}

// Parallel array data (cluster, *command*, privilege) for invoke command
Expand Down Expand Up @@ -242,6 +243,7 @@
0x00000002, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
0x00000003, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
0x00000004, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
0x00000040, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
}

// Parallel array data (cluster, command, *privilege*) for invoke command
Expand Down Expand Up @@ -284,6 +286,7 @@
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \
chip::Access::Privilege::kManage, /* Cluster: Scenes Management, Command: CopyScene, Privilege: manage */ \
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/data-model/chip/scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ limitations under the License.
<arg name="GroupIdentifierTo" type="group_id"/>
<arg name="SceneIdentifierTo" type="int8u"/>
<optionalConform/>
<access op="invoke" role="manage"/>
</command>

<command source="server" code="0x00" name="AddSceneResponse" optional="false" disableDefaultResponse="true">
Expand Down
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -4272,7 +4272,7 @@ provisional cluster ScenesManagement = 98 {
/** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
/** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */
fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64;
fabric command access(invoke: manage) CopyScene(CopySceneRequest): CopySceneResponse = 64;
}

/** Attributes and commands for monitoring HEPA filters in a device */
Expand Down

0 comments on commit 374fa2d

Please sign in to comment.