Skip to content

[FOSSOVERFLOW-25] feat: Implement Room Dropdown Using Dedicated Rooms Table #230

Description

@amaydixit11

Description

Currently, room names are entered manually while booking, which can lead to inconsistencies and errors.

We need to introduce a dedicated rooms table/collection and use it to populate a dropdown in the booking UI.


Proposed Database Schema

Create a new table/collection:

Room {
  room_id: String,
  location: String,
  allowed_roles: [String]
}

Example

{
  "room_id": "SCITECH_101",
  "location": "SciTech Building, Floor 1",
  "allowed_roles": [
    "scitech_core",
    "scitech_coordinator",
    "gensec_scitech"
  ]
}
  • By default, allowed_roles = ["all"]
  • Restricted rooms (e.g., SciTech rooms) will have limited access

Backend Requirements

  • Create Room model/schema
  • CRUD APIs for rooms (admin only)
  • API to fetch available rooms based on user role
  • Validate room access during booking

Frontend Requirements

  • Replace text input with dropdown
  • Fetch rooms from backend
  • Show only rooms user is allowed to book
  • Disable/Hide unauthorized rooms

Authorization Rules

  • Backend must verify:

    • User role ∈ room.allowed_roles
  • Prevent bypass via API calls


Acceptance Criteria

  • Rooms stored in dedicated DB collection
  • Dropdown replaces manual input
  • Role-based filtering works
  • Unauthorized bookings are blocked
  • Admins can manage rooms

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions