Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zap gen for Matter access privilege definitions #16327

Merged
merged 21 commits into from
Mar 23, 2022
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Stricter default privileges in weak functions
More conservative defaults if real implementations are not linked in.
mlepage-google committed Mar 22, 2022
commit 000438355da20877840e96ea8e9089fd0db53522
8 changes: 4 additions & 4 deletions src/app/RequiredPrivilege.cpp
Original file line number Diff line number Diff line change
@@ -28,20 +28,20 @@ constexpr Access::Privilege RequiredPrivilege::kPrivilegeMapper[];

int __attribute__((weak)) MatterGetAccessPrivilegeForReadAttribute(chip::ClusterId cluster, chip::AttributeId attribute)
mlepage-google marked this conversation as resolved.
Show resolved Hide resolved
{
return kMatterAccessPrivilegeView;
return kMatterAccessPrivilegeAdminister;
}

int __attribute__((weak)) MatterGetAccessPrivilegeForWriteAttribute(chip::ClusterId cluster, chip::AttributeId attribute)
{
return kMatterAccessPrivilegeOperate;
return kMatterAccessPrivilegeAdminister;
}

int __attribute__((weak)) MatterGetAccessPrivilegeForInvokeCommand(chip::ClusterId cluster, chip::CommandId command)
{
return kMatterAccessPrivilegeOperate;
return kMatterAccessPrivilegeAdminister;
}

int __attribute__((weak)) MatterGetAccessPrivilegeForReadEvent(chip::ClusterId cluster, chip::EventId event)
{
return kMatterAccessPrivilegeView;
return kMatterAccessPrivilegeAdminister;
}