Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/c/o/commcare-hq-HEAD/corehq/apps/hqadmin/management/commands/cchq_prbac_bootstrap.py   commcare-hq(Download)
                    logger.info('Granting privilege: %s => %s', grantee.slug, priv.slug)
                Grant.objects.create(
                    from_role=grantee,
                    to_role=priv,
                )

src/c/o/commcare-hq-HEAD/corehq/apps/accounting/management/commands/add_operations_user.py   commcare-hq(Download)
        if not ops_role.has_privilege(accounting_admin):
            Grant.objects.create(
                from_role=ops_role,
                to_role=accounting_admin,
            )

src/c/o/commcare-hq-HEAD/corehq/apps/accounting/forms.py   commcare-hq(Download)
                privilege = Role.objects.get(slug=privilege)
                Grant.objects.create(
                    from_role=role,
                    to_role=privilege,
                )