-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added custom security context to Applicant Programming Score hook.
- Loading branch information
David Wheeler
committed
Oct 8, 2018
1 parent
77a0204
commit 8520d10
Showing
5 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
package/src/custom/Extension/application/Ext/Language/en_us.applicant_prog_score_subject.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
$app_strings['LBL_AUDIT_SUBJECT_APS-HOOK'] = 'Applicant Programming Score Logic'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
package/src/custom/src/Security/Subject/ApplicantProgrammingScore.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/* | ||
* Your installation or use of this SugarCRM file is subject to the applicable | ||
* terms available at | ||
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. | ||
* If you do not agree to all of the applicable terms or do not have the | ||
* authority to bind the entity as an authorized representative, then do not | ||
* install or use this SugarCRM file. | ||
* | ||
* Copyright (C) SugarCRM Inc. All rights reserved. | ||
*/ | ||
|
||
namespace Sugarcrm\Sugarcrm\custom\Security\Subject; | ||
|
||
use Sugarcrm\Sugarcrm\Security\Subject; | ||
|
||
/** | ||
* The APS hook making changes | ||
*/ | ||
final class ApplicantProgrammingScore implements Subject | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $applicantId; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string $applicantId | ||
*/ | ||
public function __construct($applicantId) | ||
{ | ||
$this->applicantId = $applicantId; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function jsonSerialize() | ||
{ | ||
return [ | ||
'_type' => 'aps-hook', | ||
'applicant_id' => $this->applicantId | ||
]; | ||
} | ||
} |