Comments (7)
I have a query, how are admins denoted in the database?
As far as I could tell, in the rooms collection, all users present in the users
array are the admins of the room, so all of them must have the functionality, right?
from milaap.
I've added the backend for this feature in 72ec18a1433dee. I need some help as to where we can place the button in the UI, and whether or not to conditionally show it.
The backend takes care of whether the user is the admin or not.
For the front end, a possible roadmap is:
- The backend route that serves the details of the room can also add a flag next to each user (I'm not sure if this is already done) denoting whether or not he's an admin or not.
- Conditionally render a button to delete the room if that flag is true
- Hit the route and on success redirect him to the homepage
from milaap.
I have a query, how are admins denoted in the database?
As far as I could tell, in the rooms collection, all users present in theusers
array are the admins of the room, so all of them must have the functionality, right?
Yes.
from milaap.
Yup. I think the approach works. We could add a flag next to each room in the users table denoting if he's an admin of the room or a guest. Where do you plan on rendering the "Delete room" button?
from milaap.
"Delete Room" functionality can be similar to "Invite" functionality visible only to admins.
We could add a flag next to each room in the users table denoting if he's an admin of the room or a guest.
From UI point of view, there's no need for this, as for now, only the rooms which the user is an admin of is displayed on the left sidebar.
I think delete room can be rendered with all other elements only, as the user can delete whenever he/she wants to delete it.
from milaap.
From UI point of view, there's no need for this, as for now, only the rooms which the user is an admin of is displayed on the left sidebar.
Correct me if I'm wrong but, afaik to render the button "Delete", the component will need some flag denoting whether or not the current user has permissions. Is there any other way I can find out?
@Pranav2612000 take a look at 5ac0fb848a6cc7b6e6ba54, this should cover what we spoke about.
I'll start working on the UI tomorrow.
from milaap.
If the room is present in the rooms' array in the users' table, then the user is an admin of the room. The guest rooms he visits are not stored here.
from milaap.
Related Issues (20)
- Handle app after JWT is expired HOT 3
- Change PWA distrideo logo to milaap Logo HOT 1
- Emoji support in chat section HOT 1
- Scroll bar in chat section if the link size exceeds 50 character
- fix: creating a new room doesnt update ui to display new room in rooms sidebar HOT 4
- fix: "Invite" option and "Create Room" option shouldn't be available for guests HOT 4
- submit screenshots if any taken HOT 3
- Enter key is not mapped correctly on Join Page HOT 1
- When user enters a room via url which does not exist, need to show an error HOT 2
- Fix : when user types msg in chat and accidentally presses enter more than 1 time, the message is sent that many times in chat HOT 5
- Remove controls on video except - Picture in Picture and Full Screen mode HOT 2
- fix: Title of the room HOT 1
- Chat section: Message Links should be active and on clicking should open in new window HOT 1
- Mobile back-camera not switching off HOT 4
- Code Cleanup + Removal of warnings HOT 1
- Refactor to move UEXIST and other error codes as non 200 statuses HOT 3
- URLs in text messages HOT 2
- Pressing <enter> refreshes the page when creating a room HOT 1
- Contributing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from milaap.