function _services_key_auth_permissions in Services 6.2
Same name and namespace in other branches
- 7 auth/services_keyauth/services_keyauth.install \_services_key_auth_permissions()
3 calls to _services_key_auth_permissions()
- services_keyauth_install in auth/
services_keyauth/ services_keyauth.install - Implementation of hook_install().
- services_keyauth_update_6001 in auth/
services_keyauth/ services_keyauth.install - services_keyauth_update_6005 in auth/
services_keyauth/ services_keyauth.install
File
- auth/
services_keyauth/ services_keyauth.install, line 96 - Install, uninstall and update the module.
Code
function _services_key_auth_permissions(&$update) {
$schema['services_key_permissions'] = array(
'description' => t('Stores services method\'s access rights on a per API key basis.'),
'fields' => array(
'kid' => array(
'description' => t('The service key ID.'),
'type' => 'char',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'method' => array(
'description' => t('Name of service method.'),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'indexes' => array(
'api_key' => array(
'kid',
),
'method' => array(
'method',
),
),
'unique key' => array(
'key_method' => array(
'kid',
'method',
),
),
);
db_create_table($update, 'services_key_permissions', $schema['services_key_permissions']);
return $update;
}