Exemple #1
0
def del_account_attribute(key, account, issuer):
    """
    Delete an attribute to an account.

    :param key: attribute key.
    :param account: The account name.
    :param issuer: The issuer account_core.
    """
    kwargs = {"account": account, "key": key}
    if not rucio.api.permission.has_permission(issuer=issuer, action="del_attribute", kwargs=kwargs):
        raise rucio.common.exception.AccessDenied("Account %s can not delete attribute" % (issuer))
    account_core.del_account_attribute(account, key)
Exemple #2
0
def del_account_attribute(key, account, issuer):
    """
    Delete an attribute to an account.

    :param key: attribute key.
    :param account: The account name.
    :param issuer: The issuer account_core.
    """
    kwargs = {'account': account, 'key': key}
    if not rucio.api.permission.has_permission(
            issuer=issuer, action='del_attribute', kwargs=kwargs):
        raise rucio.common.exception.AccessDenied(
            'Account %s can not delete attribute' % (issuer))
    account_core.del_account_attribute(account, key)
Exemple #3
0
def del_account_attribute(key, account, issuer, vo='def', session=None):
    """
    Delete an attribute to an account.

    :param key: attribute key.
    :param account: The account name.
    :param issuer: The issuer account.
    :param vo: The VO to act on.
    :param session: The database session in use.
    """
    kwargs = {'account': account, 'key': key}
    if not rucio.api.permission.has_permission(issuer=issuer,
                                               vo=vo,
                                               action='del_attribute',
                                               kwargs=kwargs,
                                               session=session):
        raise rucio.common.exception.AccessDenied(
            'Account %s can not delete attribute' % (issuer))

    account = InternalAccount(account, vo=vo)

    account_core.del_account_attribute(account, key, session=session)