Commit 173797a
authored
refactor: allow Thread Sharing by user-defined callback (#2521)
I want to allow admins to view any threads. I determine if a user is an
admin using custom RBAC roles and saving in the user.metadata.
Presumably other developers will have other ways of doing this.
This change makes it so that as long as the `@cl.on_shared_thread_view`
returns True then the thread can be viewed, instead of requiring the
user to share the thread. Developers can customize the logic within this
callback however they see fit.1 parent 517eaa7 commit 173797a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
1004 | | - | |
1005 | | - | |
| 1004 | + | |
| 1005 | + | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| |||
0 commit comments