-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jc/register page #36
base: main
Are you sure you want to change the base?
Jc/register page #36
Conversation
83f5dc7
to
80f7f8b
Compare
@@ -15,6 +15,7 @@ defmodule KaraokiumWeb.Admin.PerformanceLive.New do | |||
socket | |||
|> assign(:performance, %Performance{}) | |||
|> assign(:page_title, "New Performance") | |||
|> assign(:karaoke_id, karaoke_id)} | |||
|> assign(:karaoke_id, karaoke_id) | |||
|> assign(:permissions, socket.assigns.current_user.permissions)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are you using this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using this on the same folder, on the file new.html.heex. I made this in order to have the same page returning to 2 different pages. This is important when we have normal users, that doesn't have any permission, and they want to register their team, their return page will be the normal karaoke page. The rest users that have permissions will go directly to the admin page when they finished registering some team. I made this for the reason to not creating another new.ex and new.html.heex which only difference would be the return page.
|
||
:sysadmin -> | ||
acc ++ sysadmin_menu(conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't change this. Each permission opens the possibility to navigate to different places and do different things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I am commiting it to another branch since this branch is for register_page and not for navbar.
] | ||
} | ||
] | ||
end | ||
|
||
defp sysadmin_menu(conn) do | ||
[ | ||
%{title: "LiveDashboard", url: Routes.live_dashboard_path(conn, :home), submenu: []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A sysadmin of the system should only get permission to access the Live Dashboard in order to monitor the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I am commiting it to another branch since this branch is for register_page and not for navbar.
80f7f8b
to
ed492b7
Compare
Give the possibility for the users creating performances on karaokes. This will reduce the time, since everyone can create their team performance, instead of being the admin creating every team performance.