@@ -79,16 +79,16 @@ class PermissionsMixin(models.Model):
79
79
groups = models .ManyToManyField (Group )
80
80
user_permissions = models .ManyToManyField (Permission )
81
81
82
- def get_user_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
83
- async def aget_user_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
84
- def get_group_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
85
- async def aget_group_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
86
- def get_all_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
87
- async def aget_all_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
88
- def has_perm (self , perm : str , obj : _AnyUser | None = ...) -> bool : ...
89
- async def ahas_perm (self , perm : str , obj : _AnyUser | None = ...) -> bool : ...
90
- def has_perms (self , perm_list : Iterable [str ], obj : _AnyUser | None = ...) -> bool : ...
91
- async def ahas_perms (self , perm_list : Iterable [str ], obj : _AnyUser | None = ...) -> bool : ...
82
+ def get_user_permissions (self , obj : Model | None = ...) -> set [str ]: ...
83
+ async def aget_user_permissions (self , obj : Model | None = ...) -> set [str ]: ...
84
+ def get_group_permissions (self , obj : Model | None = ...) -> set [str ]: ...
85
+ async def aget_group_permissions (self , obj : Model | None = ...) -> set [str ]: ...
86
+ def get_all_permissions (self , obj : Model | None = ...) -> set [str ]: ...
87
+ async def aget_all_permissions (self , obj : Model | None = ...) -> set [str ]: ...
88
+ def has_perm (self , perm : str , obj : Model | None = ...) -> bool : ...
89
+ async def ahas_perm (self , perm : str , obj : Model | None = ...) -> bool : ...
90
+ def has_perms (self , perm_list : Iterable [str ], obj : Model | None = ...) -> bool : ...
91
+ async def ahas_perms (self , perm_list : Iterable [str ], obj : Model | None = ...) -> bool : ...
92
92
def has_module_perms (self , app_label : str ) -> bool : ...
93
93
async def ahas_module_perms (self , app_label : str ) -> bool : ...
94
94
@@ -131,16 +131,16 @@ class AnonymousUser:
131
131
def groups (self ) -> EmptyManager [Group ]: ...
132
132
@property
133
133
def user_permissions (self ) -> EmptyManager [Permission ]: ...
134
- def get_user_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
135
- async def aget_user_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
136
- def get_group_permissions (self , obj : _AnyUser | None = ...) -> set [Any ]: ...
137
- async def aget_group_permissions (self , obj : _AnyUser | None = ...) -> set [Any ]: ...
138
- def get_all_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
139
- async def aget_all_permissions (self , obj : _AnyUser | None = ...) -> set [str ]: ...
140
- def has_perm (self , perm : str , obj : _AnyUser | None = ...) -> bool : ...
141
- async def ahas_perm (self , perm : str , obj : _AnyUser | None = ...) -> bool : ...
142
- def has_perms (self , perm_list : Iterable [str ], obj : _AnyUser | None = ...) -> bool : ...
143
- async def ahas_perms (self , perm_list : Iterable [str ], obj : _AnyUser | None = ...) -> bool : ...
134
+ def get_user_permissions (self , obj : Model | None = ...) -> set [str ]: ...
135
+ async def aget_user_permissions (self , obj : Model | None = ...) -> set [str ]: ...
136
+ def get_group_permissions (self , obj : Model | None = ...) -> set [Any ]: ...
137
+ async def aget_group_permissions (self , obj : Model | None = ...) -> set [Any ]: ...
138
+ def get_all_permissions (self , obj : Model | None = ...) -> set [str ]: ...
139
+ async def aget_all_permissions (self , obj : Model | None = ...) -> set [str ]: ...
140
+ def has_perm (self , perm : str , obj : Model | None = ...) -> bool : ...
141
+ async def ahas_perm (self , perm : str , obj : Model | None = ...) -> bool : ...
142
+ def has_perms (self , perm_list : Iterable [str ], obj : Model | None = ...) -> bool : ...
143
+ async def ahas_perms (self , perm_list : Iterable [str ], obj : Model | None = ...) -> bool : ...
144
144
def has_module_perms (self , module : str ) -> bool : ...
145
145
async def ahas_module_perms (self , module : str ) -> bool : ...
146
146
@property
0 commit comments