2011-12-28 01:24:50 +01:00
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
|
|
|
|
ALTER TABLE {$NAMESPACE}_owners.owners_packagecommitrelationship
|
Add Basic Auditing Functionalities
Summary:
add basic auditing functionalities. For the related commits for a
package, we detect the following conditions which might be suspicious to the
owners of the package:
* no revision specified
* revision not found
* author not match
* reviewedby not match
* owners not involved
* commit author not recognized
The owners of the package can change the status of the audit entries by
accepting it or specify concern.
The owner can turn on/off the auditing for a package.
Test Plan:
* verified that non-owner cannot see the details of the audit and cannot modify
it
* verified that all the audit reasons can be detected
* tested dropdown filtering and package search
* verified really normal change not detected
* verified accept/concern a commit
* tested enable/disable a package for auditing
* verified one audit applies to all <commit, packages> to the packages the
auditor owns
* verified that re-parsing a commit won't have effect if there exists a
relationship for <commit, package> already
Reviewers: epriestley, nh
Reviewed By: epriestley
CC: aran, benmathews, btrahan, mpodobnik, prithvi, TomL, epriestley
Differential Revision: 1242
2011-12-18 00:52:54 +01:00
|
|
|
ADD COLUMN `auditStatus` varchar(64) NOT NULL,
|
|
|
|
ADD COLUMN `auditReasons` longtext NOT NULL,
|
|
|
|
DROP KEY `packagePHID`,
|
|
|
|
ADD KEY `packagePHID` (`packagePHID`, `auditStatus`, `id`);
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
CREATE TABLE IF NOT EXISTs {$NAMESPACE}_audit.audit_comment (
|
Add Basic Auditing Functionalities
Summary:
add basic auditing functionalities. For the related commits for a
package, we detect the following conditions which might be suspicious to the
owners of the package:
* no revision specified
* revision not found
* author not match
* reviewedby not match
* owners not involved
* commit author not recognized
The owners of the package can change the status of the audit entries by
accepting it or specify concern.
The owner can turn on/off the auditing for a package.
Test Plan:
* verified that non-owner cannot see the details of the audit and cannot modify
it
* verified that all the audit reasons can be detected
* tested dropdown filtering and package search
* verified really normal change not detected
* verified accept/concern a commit
* tested enable/disable a package for auditing
* verified one audit applies to all <commit, packages> to the packages the
auditor owns
* verified that re-parsing a commit won't have effect if there exists a
relationship for <commit, package> already
Reviewers: epriestley, nh
Reviewed By: epriestley
CC: aran, benmathews, btrahan, mpodobnik, prithvi, TomL, epriestley
Differential Revision: 1242
2011-12-18 00:52:54 +01:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`phid` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
|
|
|
|
`targetPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
|
|
|
|
`actorPHID` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
|
|
|
|
`dateCreated` int(10) unsigned NOT NULL,
|
|
|
|
`dateModified` int(10) unsigned NOT NULL,
|
|
|
|
`action` varchar(64) NOT NULL,
|
|
|
|
`content` longtext NOT NULL,
|
|
|
|
PRIMARY KEY `id` (`id`),
|
|
|
|
KEY `targetPHID` (`targetPHID`, `actorPHID`, `id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
ALTER TABLE {$NAMESPACE}_owners.owners_package
|
Add Basic Auditing Functionalities
Summary:
add basic auditing functionalities. For the related commits for a
package, we detect the following conditions which might be suspicious to the
owners of the package:
* no revision specified
* revision not found
* author not match
* reviewedby not match
* owners not involved
* commit author not recognized
The owners of the package can change the status of the audit entries by
accepting it or specify concern.
The owner can turn on/off the auditing for a package.
Test Plan:
* verified that non-owner cannot see the details of the audit and cannot modify
it
* verified that all the audit reasons can be detected
* tested dropdown filtering and package search
* verified really normal change not detected
* verified accept/concern a commit
* tested enable/disable a package for auditing
* verified one audit applies to all <commit, packages> to the packages the
auditor owns
* verified that re-parsing a commit won't have effect if there exists a
relationship for <commit, package> already
Reviewers: epriestley, nh
Reviewed By: epriestley
CC: aran, benmathews, btrahan, mpodobnik, prithvi, TomL, epriestley
Differential Revision: 1242
2011-12-18 00:52:54 +01:00
|
|
|
ADD COLUMN `auditingEnabled` tinyint(1) NOT NULL DEFAULT 0;
|