mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-16 04:46:46 +08:00
d11084d32f
* add shared mode (working)
* add markdown write permission
* Add authorize handle_event
* Revert "add shared mode (working)"
This reverts commit c1e9ebac4d
.
* Add assert_policy!
* Apply suggestions code review
* Apply suggestions from code review
* Apply suggestions from code reviews (redirect)
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Add PolicyHook
* remove assert_live_action_access!/1
* Apply suggestions from code review
* Apply suggestions from code review
* Update lib/livebook_web/live/session_live.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
7 lines
224 B
Elixir
7 lines
224 B
Elixir
defmodule LivebookWeb.PolicyHook do
|
|
import Phoenix.LiveView
|
|
|
|
def on_mount(:private, _params, _session, socket) do
|
|
{:cont, socket |> assign(:policy, %{read: true, execute: true, comment: true, edit: true})}
|
|
end
|
|
end
|