Skip to content

feat(iam): add menu_id/menu_title to permission proto - #45

Merged
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:feat/rbac-page-scoped-permissions
Jul 1, 2026
Merged

feat(iam): add menu_id/menu_title to permission proto#45
ilramdhan merged 1 commit into
mutugading:mainfrom
ilramdhan:feat/rbac-page-scoped-permissions

Conversation

@ilramdhan

Copy link
Copy Markdown
Member

Description

Change Type

  • ✨ New service/message
  • ➕ Add field/RPC/enum value
  • 🔄 Modify validation
  • 📝 Documentation update
  • ⚠️ Deprecation
  • 🔧 Config/script changes

Proto Files Changed

  • common/v1/common.proto
  • finance/v1/uom.proto
  • Other: _______________

Changes Made

Related Issues

Fixes #
Related to #

Breaking Change Check

Is this a breaking change?

  • No - buf breaking passes
  • Yes - Requires version bump

Breaking Change Evidence

# Output of buf breaking command
buf breaking --against '.git#branch=main'

Lint Check

# Output of buf lint
buf lint

Generated Code Preview (Optional)

// Generated Go code changes

Pre-merge Checklist

  • I have read and followed RULES.md
  • buf format -w applied
  • buf lint passes
  • buf breaking passes
  • Comments document new messages/fields
  • REST mappings follow conventions
  • Validation rules are complete
  • Field numbers are logical

Impact Assessment

  • Backend code regeneration required
  • Frontend code regeneration required
  • OpenAPI spec regeneration required

Reviewer Notes

Copilot AI review requested due to automatic review settings July 1, 2026 05:00
@ilramdhan
ilramdhan merged commit 653e347 into mutugading:main Jul 1, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the IAM permission proto definitions to support associating permissions with an owning UI menu/page (via menu_id and display menu_title), enabling permissions to be grouped and filtered by menu.

Changes:

  • Added menu_id / menu_title to PermissionDetail for response payload enrichment.
  • Added menu_id to CreatePermissionRequest and UpdatePermissionRequest, and added a menu_id filter to ListPermissionsRequest.
  • Updated CreatePermissionRequest.description validation (now includes min_len: 1).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread iam/v1/role.proto
Comment on lines +326 to +329
string description = 3 [(buf.validate.field).string = {
min_len: 1
max_len: 500
}];
Comment thread iam/v1/role.proto
optional string permission_name = 2 [(buf.validate.field).string.max_len = 100];
optional string description = 3 [(buf.validate.field).string.max_len = 500];
optional bool is_active = 4;
optional string menu_id = 5 [(buf.validate.field).string.uuid = true];
Comment thread iam/v1/role.proto
]
}];
// Filter by menu_id (owning page/menu)
string menu_id = 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants