Permalink
Browse files

Move reskey vars over to reskey_vars

  • Loading branch information...
1 parent d314d24 commit df3db44b80f19ce705c98a074216762f008eb5f8 @pudge pudge committed Oct 11, 2005
Showing with 101 additions and 0 deletions.
  1. +101 −0 sql/mysql/upgrades
View
@@ -3241,6 +3241,107 @@ DROP TABLE daypass_users;
INSERT INTO vars (name, value, description) VALUES ('cvs_tag_currentcode_emit','1','Emit cvs_tag_currentcode revision number in the X-Powered-By header. If you are paranoid or believe in security through obscurity feel free to leave this false, but in the event of a security hole it may help us contact you');
+
+INSERT IGNORE INTO vars VALUES ('reskey_srcid_masksize', 24, 'which srcid mask size to use for reskeys');
+INSERT IGNORE INTO vars VALUES ('reskey_timeframe', 14400, 'Default timeframe base to use for max-uses (in seconds)');
+
+INSERT IGNORE INTO reskey_resources VALUES (1, 'comments');
+INSERT IGNORE INTO reskey_resources VALUES (2, 'zoo');
+INSERT INTO reskey_resources VALUES (3, 'journal');
+INSERT INTO reskey_resources VALUES (4, 'journal-soap');
+
+### do this, but be careful, if you've changed the defaults, to note those changes
+DELETE FROM vars WHERE name LIKE 'reskey_checks_%';
+
+DROP TABLE IF EXISTS reskey_vars;
+CREATE TABLE reskey_vars (
+ rkrid TINYINT UNSIGNED NOT NULL,
+ name VARCHAR(48) DEFAULT '' NOT NULL,
+ value TEXT,
+ description VARCHAR(255),
+ UNIQUE name_rkrid (name, rkrid)
+) TYPE=InnoDB;
+
+
+##### comments
+### checks
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::User', 101);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::ACL', 201);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::AL2::AnonNoPost', 301);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::AL2::NoPostAnon', 401);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::AL2::NoPost', 501);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'all', 'Slash::ResKey::Checks::Duration', 601);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 1, 'use', 'Slash::ResKey::Checks::ProxyScan', 1001);
+
+### vars
+INSERT INTO reskey_vars VALUES (1, 'adminbypass', 1, 'If admin, bypass checks for duration, proxy, and user');
+INSERT INTO reskey_vars VALUES (1, 'acl_no', 'reskey_no_comments', 'If this ACL present, can\'t use resource');
+INSERT INTO reskey_vars VALUES (1, 'user_seclev', 0, 'Minimum seclev to use resource');
+INSERT INTO reskey_vars VALUES (1, 'user_karma', '', 'No minimum karma to use resource');
+INSERT INTO reskey_vars VALUES (1, 'duration_max-uses', 30, 'how many uses per timeframe');
+INSERT INTO reskey_vars VALUES (1, 'duration_max-failures', 10, 'how many failures per reskey');
+INSERT INTO reskey_vars VALUES (1, 'duration_uses', 120, 'min duration (in seconds) between uses');
+INSERT INTO reskey_vars VALUES (1, 'duration_creation-use', 5, 'min duration between (in seconds) creation and use');
+
+##### zoo
+### checks
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::User', 101);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::ACL', 201);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::AL2::AnonNoPost', 301);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::AL2::NoPostAnon', 401);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::AL2::NoPost', 501);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'all', 'Slash::ResKey::Checks::Duration', 601);
+INSERT IGNORE INTO reskey_resource_checks VALUES (NULL, 2, 'use', 'Slash::ResKey::Checks::ProxyScan', 1001);
+
+### vars
+INSERT INTO reskey_vars VALUES (2, 'adminbypass', 1, 'If admin, bypass checks for duration, proxy, and user');
+INSERT INTO reskey_vars VALUES (2, 'acl_no', 'reskey_no_zoo', 'If this ACL present, can\'t use resource');
+INSERT INTO reskey_vars VALUES (2, 'user_seclev', 1, 'Minimum seclev to use resource');
+INSERT INTO reskey_vars VALUES (2, 'duration_max-uses', 30, 'how many uses per timeframe');
+INSERT INTO reskey_vars VALUES (2, 'duration_max-failures', 4, 'how many failures per reskey');
+INSERT INTO reskey_vars VALUES (2, 'duration_uses', 2, 'min duration (in seconds) between uses');
+INSERT INTO reskey_vars VALUES (2, 'duration_creation-use', 2, 'min duration (in seconds) between creation and use');
+
+##### journal
+### checks
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::User', 101);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::ACL', 201);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::AL2::AnonNoPost', 301);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::AL2::NoPostAnon', 401);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::AL2::NoPost', 501);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'all', 'Slash::ResKey::Checks::Duration', 601);
+INSERT INTO reskey_resource_checks VALUES (NULL, 3, 'use', 'Slash::ResKey::Checks::ProxyScan', 1001);
+
+### vars
+INSERT INTO reskey_vars VALUES (3, 'adminbypass', 1, 'If admin, bypass checks for duration, proxy, and user');
+INSERT INTO reskey_vars VALUES (3, 'acl_no', 'reskey_no_journal', 'If this ACL present, can\'t use resource');
+INSERT INTO reskey_vars VALUES (3, 'user_seclev', 1, 'Minimum seclev to use resource');
+INSERT INTO reskey_vars VALUES (3, 'duration_max-uses', 30, 'how many uses per timeframe');
+INSERT INTO reskey_vars VALUES (3, 'duration_max-failures', 10, 'how many failures per reskey');
+INSERT INTO reskey_vars VALUES (3, 'duration_uses', 30, 'min duration (in seconds) between uses');
+INSERT INTO reskey_vars VALUES (3, 'duration_creation-use', 2, 'min duration (in seconds) between creation and use');
+
+
+##### journal-soap
+### checks
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::User', 101);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::ACL', 201);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::AL2::AnonNoPost', 301);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::AL2::NoPostAnon', 401);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::AL2::NoPost', 501);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'all', 'Slash::ResKey::Checks::Duration', 601);
+INSERT INTO reskey_resource_checks VALUES (NULL, 4, 'use', 'Slash::ResKey::Checks::ProxyScan', 1001);
+
+### vars
+INSERT INTO reskey_vars VALUES (4, 'adminbypass', 1, 'If admin, bypass checks for duration, proxy, and user');
+INSERT INTO reskey_vars VALUES (4, 'acl_no', 'reskey_no_journal', 'If this ACL present, can\'t use resource');
+INSERT INTO reskey_vars VALUES (4, 'user_seclev', 1, 'Minimum seclev to use resource');
+INSERT INTO reskey_vars VALUES (4, 'duration_max-uses', 30, 'how many uses per timeframe');
+INSERT INTO reskey_vars VALUES (4, 'duration_max-failures', 10, 'how many failures per reskey');
+INSERT INTO reskey_vars VALUES (4, 'duration_uses', 30, 'min duration (in seconds) between uses');
+
+
+
UPDATE vars SET value = 'T_2_5_0_83' WHERE name = 'cvs_tag_currentcode';
# End of T_2_5_0_84, Start of T_2_5_0_85 - 2005/10/11

0 comments on commit df3db44

Please sign in to comment.