Skip to content

feat: implement RBAC with roles guard and decorator, fix transactions…#51

Merged
Uyoxy merged 4 commits intostellarspend:mainfrom
Yilkash:feature/rbac-implementation
Mar 5, 2026
Merged

feat: implement RBAC with roles guard and decorator, fix transactions…#51
Uyoxy merged 4 commits intostellarspend:mainfrom
Yilkash:feature/rbac-implementation

Conversation

@Yilkash
Copy link
Copy Markdown
Contributor

@Yilkash Yilkash commented Mar 4, 2026

close #17
Branch: feature/rbac-implementation

Description

Implements Role-Based Access Control (RBAC) to secure administrative endpoints and fixes critical syntax errors in the TransactionsModule.

Changes

  • NEW: src/common/guards/roles.guard.ts - Guard to check user roles.
  • NEW: src/modules/auth/roles.decorator.ts - @Roles() decorator.
  • MODIFY: src/modules/users/user.entity.ts - Added role column and UserRole enum.
  • MODIFY: src/modules/admin/admin.controller.ts - Secured endpoints with @Roles(UserRole.ADMIN).
  • MODIFY: src/modules/transactions/transactions.module.ts - Fixed syntax errors (duplicate decorators and misplaced imports).

Verification

  • Verified module syntax and TypeORM entity definitions.
  • RolesGuard correctly pulls user roles from the request object for authorization.

@Uyoxy
Copy link
Copy Markdown
Contributor

Uyoxy commented Mar 4, 2026

@Yilkash resolve conflict

@Yilkash
Copy link
Copy Markdown
Contributor Author

Yilkash commented Mar 4, 2026

@Uyoxy PR resolved

@Uyoxy
Copy link
Copy Markdown
Contributor

Uyoxy commented Mar 5, 2026

your check is failing kindly fix it

@Yilkash
Copy link
Copy Markdown
Contributor Author

Yilkash commented Mar 5, 2026

@Uyoxy I was about doing that and you closed the issue , i did not get any point on this issue, it is showing under review

@Uyoxy Uyoxy reopened this Mar 5, 2026
@Uyoxy
Copy link
Copy Markdown
Contributor

Uyoxy commented Mar 5, 2026

@Yilkash it was a mix up please proceed

@Yilkash
Copy link
Copy Markdown
Contributor Author

Yilkash commented Mar 5, 2026

@Uyoxy all issues fixed and resolved

@Uyoxy Uyoxy merged commit 8a7039f into stellarspend:main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Role-Based Access Control (RBAC)

2 participants