# Path: groups_manager/utils.py
# def get_permission_name(action, obj):
#     if action in ['add', 'view', 'change', 'delete']:
#         return get_permission_codename(action, obj._meta)
#     return action


import copy
    from guardian.shortcuts import assign_perm
from groups_manager.utils import get_permission_name
    from groups_manager.settings import GROUPS_MANAGER
    from groups_manager.settings import GROUPS_MANAGER

try:
except ImportError:
    def assign_perm(perm_name, group_or_user, obj):
        pass



def assign_related(related_groups, perms, obj):
    if isinstance(perms, dict):
        default = set(perms.pop('default', []))

        for group in related_groups:
            django_group = group.django_group

            for permission in default:

# Path: groups_manager/utils.py
# def get_permission_name(action, obj):
#     if action in ['add', 'view', 'change', 'delete']:
#         return get_permission_codename(action, obj._meta)
#     return action


# Path: groups_manager/perms.py
import copy
    from guardian.shortcuts import assign_perm
from groups_manager.utils import get_permission_name
    from groups_manager.settings import GROUPS_MANAGER
    from groups_manager.settings import GROUPS_MANAGER


try:
except ImportError:
    def assign_perm(perm_name, group_or_user, obj):
        pass



def assign_related(related_groups, perms, obj):
    if isinstance(perms, dict):
        default = set(perms.pop('default', []))

        for group in related_groups:
            django_group = group.django_group

            for permission in default:

                perm_name = get_permission_name(permission, obj)