You are here

function _oauth2_client_test_revoke_permissions in OAuth2 Client 7

Same name and namespace in other branches
  1. 7.2 tests/oauth2_client_test.install \_oauth2_client_test_revoke_permissions()

File

tests/oauth2_client_test.install, line 154
Enable and disable hook functions.

Code

function _oauth2_client_test_revoke_permissions() {

  // Remove the permission for using the oauth2 server.
  foreach (array(
    'anonymous user',
    'authenticated user',
  ) as $role_name) {
    $role = user_role_load_by_name($role_name);
    user_role_revoke_permissions($role->rid, array(
      'use oauth2 server',
    ));
  }
}