mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-06-06 17:13:02 -04:00
feat: LTI support and Moodle plugin
This commit is contained in:
@@ -131,6 +131,10 @@ class User(AbstractUser):
|
||||
rbac_groups = RBACGroup.objects.filter(memberships__user=self, memberships__role__in=["member", "contributor", "manager"], categories=category)
|
||||
return rbac_groups.exists()
|
||||
|
||||
def has_contributor_access_to_category(self, category):
|
||||
rbac_groups = RBACGroup.objects.filter(memberships__user=self, memberships__role__in=["contributor", "manager"], categories=category)
|
||||
return rbac_groups.exists()
|
||||
|
||||
def has_member_access_to_media(self, media):
|
||||
# First check if user is the owner
|
||||
if media.user == self:
|
||||
|
||||
+2
-2
@@ -8,12 +8,12 @@ urlpatterns = [
|
||||
re_path(r"^user/(?P<username>[\w@._-]*)/shared_with_me", views.shared_with_me, name="shared_with_me"),
|
||||
re_path(r"^user/(?P<username>[\w@._-]*)/shared_by_me", views.shared_by_me, name="shared_by_me"),
|
||||
re_path(
|
||||
r"^user/(?P<username>[\w@.]*)/playlists$",
|
||||
r"^user/(?P<username>[\w@._-]*)/playlists$",
|
||||
views.view_user_playlists,
|
||||
name="get_user_playlists",
|
||||
),
|
||||
re_path(
|
||||
r"^user/(?P<username>[\w@.]*)/about$",
|
||||
r"^user/(?P<username>[\w@._-]*)/about$",
|
||||
views.view_user_about,
|
||||
name="get_user_about",
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user