Skip to content

Commit

Permalink
Align Access Control cluster XML with the spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed May 23, 2023
1 parent c24294a commit c176be5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/server/AclStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using Entry = AccessControl::Entry;
using EntryListener = AccessControl::EntryListener;
using StagingAuthMode = Clusters::AccessControl::AccessControlEntryAuthModeEnum;
using StagingPrivilege = Clusters::AccessControl::AccessControlEntryPrivilegeEnum;
using StagingTarget = Clusters::AccessControl::Structs::Target::Type;
using StagingTarget = Clusters::AccessControl::Structs::AccessControlTargetStruct::Type;
using Target = AccessControl::Entry::Target;

namespace {
Expand Down
2 changes: 1 addition & 1 deletion src/app/server/AclStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AclStorage
{
using Entry = Access::AccessControl::Entry;
using StagingEntry = Clusters::AccessControl::Structs::AccessControlEntryStruct::Type;
using StagingTarget = Clusters::AccessControl::Structs::Target::Type;
using StagingTarget = Clusters::AccessControl::Structs::AccessControlTargetStruct::Type;

public:
EncodableEntry(const Entry & entry) : mEntry(entry) {}
Expand Down
2 changes: 1 addition & 1 deletion src/app/server/DefaultAclStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using Entry = AccessControl::Entry;
using EntryListener = AccessControl::EntryListener;
using StagingAuthMode = Clusters::AccessControl::AccessControlEntryAuthModeEnum;
using StagingPrivilege = Clusters::AccessControl::AccessControlEntryPrivilegeEnum;
using StagingTarget = Clusters::AccessControl::Structs::Target::Type;
using StagingTarget = Clusters::AccessControl::Structs::AccessControlTargetStruct::Type;
using Target = AccessControl::Entry::Target;

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<item name="Removed" value="0x02"/>
</enum>

<struct name="Target">
<struct name="AccessControlTargetStruct">
<cluster code="0x001F"/>
<item fieldId="0" name="Cluster" type="cluster_id" isNullable="true"/>
<item fieldId="1" name="Endpoint" type="endpoint_no" isNullable="true"/>
Expand All @@ -52,7 +52,7 @@ limitations under the License.
<item fieldId="1" name="Privilege" type="AccessControlEntryPrivilegeEnum" isFabricSensitive="true"/>
<item fieldId="2" name="AuthMode" type="AccessControlEntryAuthModeEnum" isFabricSensitive="true"/>
<item fieldId="3" name="Subjects" type="INT64U" isNullable="true" array="true" isFabricSensitive="true"/>
<item fieldId="4" name="Targets" type="Target" isNullable="true" array="true" isFabricSensitive="true"/>
<item fieldId="4" name="Targets" type="AccessControlTargetStruct" isNullable="true" array="true" isFabricSensitive="true"/>
</struct>

<struct name="AccessControlExtensionStruct" isFabricScoped="true">
Expand Down
13 changes: 13 additions & 0 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7410,13 +7410,20 @@
- targetTemperature
- targetTemperatureLevel
structs:
AccessControl:
- AccessControlTargetStruct
BasicInformation:
- ProductAppearanceStruct
BridgedDeviceBasicInformation:
- ProductAppearanceStruct
TemperatureControl:
- TemperatureLevelStruct
struct fields:
AccessControl:
AccessControlTargetStruct:
- cluster
- endpoint
- deviceType
BasicInformation:
ProductAppearanceStruct:
- finish
Expand Down Expand Up @@ -7854,6 +7861,9 @@
# We apparently forgot to deprecate BridgedDeviceBasic when we
# introduced BridgedDeviceBasicInformation.
- BridgedDeviceBasic
structs:
AccessControl:
- Target
bitmaps:
Groups:
- GroupClusterFeature
Expand All @@ -7870,6 +7880,9 @@
commands:
TimeSynchronization:
SetUTCTime: SetUtcTime
structs:
AccessControl:
AccessControlTargetStruct: Target
enum values:
TimeSynchronization:
TimeSourceEnum:
Expand Down

0 comments on commit c176be5

Please sign in to comment.