Skip to content

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

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

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

Conversation

@Yilkash

@Yilkash Yilkash commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

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

Uyoxy commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@Yilkash resolve conflict

@Yilkash

Yilkash commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@Uyoxy PR resolved

@Uyoxy

Uyoxy commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

your check is failing kindly fix it

@Yilkash

Yilkash commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@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

Uyoxy commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

@Yilkash it was a mix up please proceed

@Yilkash

Yilkash commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

@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