Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15382236
D20670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D20670.diff
View Options
diff --git a/src/applications/people/editor/PhabricatorUserEditor.php b/src/applications/people/editor/PhabricatorUserEditor.php
--- a/src/applications/people/editor/PhabricatorUserEditor.php
+++ b/src/applications/people/editor/PhabricatorUserEditor.php
@@ -74,13 +74,6 @@
throw $ex;
}
- $log = PhabricatorUserLog::initializeNewLog(
- $this->requireActor(),
- $user->getPHID(),
- PhabricatorUserLog::ACTION_CREATE);
- $log->setNewValue($email->getAddress());
- $log->save();
-
if ($is_reassign) {
$log = PhabricatorUserLog::initializeNewLog(
$this->requireActor(),
@@ -100,35 +93,6 @@
}
- /**
- * @task edit
- */
- public function updateUser(
- PhabricatorUser $user,
- PhabricatorUserEmail $email = null) {
-
- if (!$user->getID()) {
- throw new Exception(pht('User has not been created yet!'));
- }
-
- $user->openTransaction();
- $user->save();
- if ($email) {
- $email->save();
- }
-
- $log = PhabricatorUserLog::initializeNewLog(
- $this->requireActor(),
- $user->getPHID(),
- PhabricatorUserLog::ACTION_EDIT);
- $log->save();
-
- $user->saveTransaction();
-
- return $this;
- }
-
-
/* -( Editing Roles )------------------------------------------------------ */
/**
@@ -151,18 +115,9 @@
return $this;
}
- $log = PhabricatorUserLog::initializeNewLog(
- $actor,
- $user->getPHID(),
- PhabricatorUserLog::ACTION_SYSTEM_AGENT);
- $log->setOldValue($user->getIsSystemAgent());
- $log->setNewValue($system_agent);
-
$user->setIsSystemAgent((int)$system_agent);
$user->save();
- $log->save();
-
$user->endWriteLocking();
$user->saveTransaction();
@@ -189,18 +144,9 @@
return $this;
}
- $log = PhabricatorUserLog::initializeNewLog(
- $actor,
- $user->getPHID(),
- PhabricatorUserLog::ACTION_MAILING_LIST);
- $log->setOldValue($user->getIsMailingList());
- $log->setNewValue($mailing_list);
-
$user->setIsMailingList((int)$mailing_list);
$user->save();
- $log->save();
-
$user->endWriteLocking();
$user->saveTransaction();
diff --git a/src/applications/people/storage/PhabricatorUserLog.php b/src/applications/people/storage/PhabricatorUserLog.php
--- a/src/applications/people/storage/PhabricatorUserLog.php
+++ b/src/applications/people/storage/PhabricatorUserLog.php
@@ -11,16 +11,6 @@
const ACTION_LOGIN_LEGALPAD = 'login-legalpad';
const ACTION_RESET_PASSWORD = 'reset-pass';
- const ACTION_CREATE = 'create';
- const ACTION_EDIT = 'edit';
-
- const ACTION_ADMIN = 'admin';
- const ACTION_SYSTEM_AGENT = 'system-agent';
- const ACTION_MAILING_LIST = 'mailing-list';
- const ACTION_DISABLE = 'disable';
- const ACTION_APPROVE = 'approve';
- const ACTION_DELETE = 'delete';
-
const ACTION_CONDUIT_CERTIFICATE = 'conduit-cert';
const ACTION_CONDUIT_CERTIFICATE_FAILURE = 'conduit-cert-fail';
@@ -31,7 +21,6 @@
const ACTION_EMAIL_REASSIGN = 'email-reassign';
const ACTION_CHANGE_PASSWORD = 'change-password';
- const ACTION_CHANGE_USERNAME = 'change-username';
const ACTION_ENTER_HISEC = 'hisec-enter';
const ACTION_EXIT_HISEC = 'hisec-exit';
@@ -59,14 +48,6 @@
pht('Login: Signed Required Legalpad Documents'),
self::ACTION_LOGOUT => pht('Logout'),
self::ACTION_RESET_PASSWORD => pht('Reset Password'),
- self::ACTION_CREATE => pht('Create Account'),
- self::ACTION_EDIT => pht('Edit Account'),
- self::ACTION_ADMIN => pht('Add/Remove Administrator'),
- self::ACTION_SYSTEM_AGENT => pht('Add/Remove System Agent'),
- self::ACTION_MAILING_LIST => pht('Add/Remove Mailing List'),
- self::ACTION_DISABLE => pht('Enable/Disable'),
- self::ACTION_APPROVE => pht('Approve Registration'),
- self::ACTION_DELETE => pht('Delete User'),
self::ACTION_CONDUIT_CERTIFICATE
=> pht('Conduit: Read Certificate'),
self::ACTION_CONDUIT_CERTIFICATE_FAILURE
@@ -77,7 +58,6 @@
self::ACTION_EMAIL_VERIFY => pht('Email: Verify'),
self::ACTION_EMAIL_REASSIGN => pht('Email: Reassign'),
self::ACTION_CHANGE_PASSWORD => pht('Change Password'),
- self::ACTION_CHANGE_USERNAME => pht('Change Username'),
self::ACTION_ENTER_HISEC => pht('Hisec: Enter'),
self::ACTION_EXIT_HISEC => pht('Hisec: Exit'),
self::ACTION_FAIL_HISEC => pht('Hisec: Failed Attempt'),
diff --git a/src/applications/people/xaction/PhabricatorUserApproveTransaction.php b/src/applications/people/xaction/PhabricatorUserApproveTransaction.php
--- a/src/applications/people/xaction/PhabricatorUserApproveTransaction.php
+++ b/src/applications/people/xaction/PhabricatorUserApproveTransaction.php
@@ -19,10 +19,6 @@
public function applyExternalEffects($object, $value) {
$user = $object;
- $this->newUserLog(PhabricatorUserLog::ACTION_APPROVE)
- ->setOldValue((bool)$user->getIsApproved())
- ->setNewValue((bool)$value)
- ->save();
$actor = $this->getActor();
$title = pht(
diff --git a/src/applications/people/xaction/PhabricatorUserDisableTransaction.php b/src/applications/people/xaction/PhabricatorUserDisableTransaction.php
--- a/src/applications/people/xaction/PhabricatorUserDisableTransaction.php
+++ b/src/applications/people/xaction/PhabricatorUserDisableTransaction.php
@@ -17,13 +17,6 @@
$object->setIsDisabled((int)$value);
}
- public function applyExternalEffects($object, $value) {
- $this->newUserLog(PhabricatorUserLog::ACTION_DISABLE)
- ->setOldValue((bool)$object->getIsDisabled())
- ->setNewValue((bool)$value)
- ->save();
- }
-
public function getTitle() {
$new = $this->getNewValue();
if ($new) {
diff --git a/src/applications/people/xaction/PhabricatorUserEmpowerTransaction.php b/src/applications/people/xaction/PhabricatorUserEmpowerTransaction.php
--- a/src/applications/people/xaction/PhabricatorUserEmpowerTransaction.php
+++ b/src/applications/people/xaction/PhabricatorUserEmpowerTransaction.php
@@ -17,15 +17,6 @@
$object->setIsAdmin((int)$value);
}
- public function applyExternalEffects($object, $value) {
- $user = $object;
-
- $this->newUserLog(PhabricatorUserLog::ACTION_ADMIN)
- ->setOldValue($this->getOldValue())
- ->setNewValue($value)
- ->save();
- }
-
public function validateTransactions($object, array $xactions) {
$user = $object;
$actor = $this->getActor();
diff --git a/src/applications/people/xaction/PhabricatorUserTransactionType.php b/src/applications/people/xaction/PhabricatorUserTransactionType.php
--- a/src/applications/people/xaction/PhabricatorUserTransactionType.php
+++ b/src/applications/people/xaction/PhabricatorUserTransactionType.php
@@ -1,13 +1,4 @@
<?php
abstract class PhabricatorUserTransactionType
- extends PhabricatorModularTransactionType {
-
- protected function newUserLog($action) {
- return PhabricatorUserLog::initializeNewLog(
- $this->getActor(),
- $this->getObject()->getPHID(),
- $action);
- }
-
-}
+ extends PhabricatorModularTransactionType {}
diff --git a/src/applications/people/xaction/PhabricatorUserUsernameTransaction.php b/src/applications/people/xaction/PhabricatorUserUsernameTransaction.php
--- a/src/applications/people/xaction/PhabricatorUserUsernameTransaction.php
+++ b/src/applications/people/xaction/PhabricatorUserUsernameTransaction.php
@@ -24,11 +24,6 @@
$old_username = $this->getOldValue();
$new_username = $this->getNewValue();
- $this->newUserLog(PhabricatorUserLog::ACTION_CHANGE_USERNAME)
- ->setOldValue($old_username)
- ->setNewValue($new_username)
- ->save();
-
// The SSH key cache currently includes usernames, so dirty it. See T12554
// for discussion.
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 11:26 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7691691
Default Alt Text
D20670.diff (7 KB)
Attached To
Mode
D20670: Remove explicit administrative actions from the user activity log
Attached
Detach File
Event Timeline
Log In to Comment