MCPcopy Create free account

hub / github.com/cocoakekeyu/cancan / functions

Functions60 in github.com/cocoakekeyu/cancan

↓ 44 callersMethodcan
Check if the user has permission to perform a given action on an object
cancan/ability.py:46
↓ 24 callersMethodadd
Add ability are allowed using two arguments. The first one is the action you're setting the permission for, the second one i
cancan/ability.py:21
↓ 5 callersFunctionauthorize
(user, action, subject)
django_example/blog/auth.py:29
↓ 2 callersMethodadd_rule
(self, rule)
cancan/ability.py:43
↓ 2 callersMethodaddnot
Defines an ability which cannot be done.
cancan/ability.py:37
↓ 2 callersMethodalias_action
Alias one or more actions into another one. self.alias_action('create', 'read', 'update', 'delete', to='crud')
cancan/ability.py:92
↓ 2 callersFunctionlistify
(o)
cancan/rule.py:12
↓ 1 callersMethodcannot
Convenience method which works the same as "can" but returns the opposite value.
cancan/ability.py:55
↓ 1 callersFunctioncreate
(request)
django_example/blog/views.py:35
↓ 1 callersFunctiondelete
(request, article_id)
django_example/blog/views.py:58
↓ 1 callersMethodexpand_actions
Accepts an array of actions and returns an array of actions which match
cancan/ability.py:81
↓ 1 callersFunctionindex
(request)
django_example/blog/views.py:28
↓ 1 callersMethodinit_guest_ability
(self)
django_example/blog/auth.py:17
↓ 1 callersMethodinit_superuser_ability
(self)
django_example/blog/auth.py:25
↓ 1 callersMethodinit_user_ability
(self)
django_example/blog/auth.py:20
↓ 1 callersMethodis_relevant
Matches both the subject and action, not necessarily the conditions.
cancan/rule.py:42
↓ 1 callersMethodmatches_action
(self, action)
cancan/rule.py:52
↓ 1 callersMethodmatches_conditions
(self, action, subject, **conditions)
cancan/rule.py:70
↓ 1 callersMethodmatches_dict_conditions
(self, action, subject)
cancan/rule.py:80
↓ 1 callersMethodmatches_function
(self, action, subject)
cancan/rule.py:84
↓ 1 callersMethodmatches_subject
(self, subject)
cancan/rule.py:48
↓ 1 callersMethodmatches_subject_class
(self, subject)
cancan/rule.py:56
↓ 1 callersMethodoptimize
(self, rules)
cancan/ability.py:72
↓ 1 callersMethodrelevant_rules_for_match
retrive match action and subject
cancan/ability.py:62
↓ 1 callersFunctionshow
(request, article_id)
django_example/blog/views.py:42
↓ 1 callersFunctionupdate
(request, article_id)
django_example/blog/views.py:50
Method__init__
(self, id, name, role)
example.py:5
Method__init__
(self, title, user_id)
example.py:12
Method__init__
(self, user)
example.py:22
Method__init__
(self, user)
django_example/blog/auth.py:7
Method__init__
(self, title, user_id)
cancan/tests.py:57
Method__init__
The first argument when initializing is the base_behavior which is a true/false value. True for "can" and false for "cannot".
cancan/rule.py:20
Method__str__
(self)
cancan/rule.py:39
Methodaliased_actions
(self)
cancan/ability.py:111
Functiondispatch
(request, *args, **kwargs)
django_example/blog/views.py:8
Methodexpanded_actions
(self)
cancan/rule.py:90
Methodhas_all
(rule)
cancan/ability.py:73
Functionitem_dispatch
(request, *args, **kwargs)
django_example/blog/views.py:17
Methodrules
(self)
cancan/ability.py:119
MethodsetUp
(self)
django_example/blog/tests.py:9
MethodsetUp
(self)
cancan/tests.py:9
Methodtest
(subject, id, len_title)
cancan/tests.py:92
Methodtest_admin_can_delete_all
(self)
django_example/blog/tests.py:64
Methodtest_admin_can_update_all
(self)
django_example/blog/tests.py:52
Methodtest_alias_action
(self)
cancan/tests.py:48
Methodtest_base_ability
(self)
cancan/tests.py:12
Methodtest_conditions
(self)
cancan/tests.py:55
Methodtest_fuction
(self)
cancan/tests.py:69
Methodtest_fuction_with_args
(self)
cancan/tests.py:86
Methodtest_guest_can_not_create
(self)
django_example/blog/tests.py:35
Methodtest_guest_index
(self)
django_example/blog/tests.py:23
Methodtest_list_action_or_subject
(self)
cancan/tests.py:30
Methodtest_not_action
(self)
cancan/tests.py:41
Functiontest_title_gt_100
(article)
example.py:17
Methodtest_user_can_not_delete
(self)
django_example/blog/tests.py:58
Methodtest_user_can_not_update
(self)
django_example/blog/tests.py:46
Methodtest_user_create
(self)
django_example/blog/tests.py:29
Methodtest_user_index
(self)
django_example/blog/tests.py:17
Methodtest_user_update_owner_article
(self)
django_example/blog/tests.py:40
Methoduser_id_less_10
(subject)
cancan/tests.py:75