Skip to content

Commit

Permalink
Add missing relation type issuer->cert & disable export in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Nov 29, 2022
1 parent f5ea208 commit d2b5622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions application/controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class DashboardController extends Controller
public function indexAction()
{
$this->addTitleTab($this->translate('Certificate Dashboard'));
$this->getTabs()->disableLegacyExtensions();

try {
$db = $this->getDb();
Expand Down
5 changes: 4 additions & 1 deletion library/X509/Model/X509Certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ public function createBehaviors(Behaviors $behaviors)

public function createRelations(Relations $relations)
{
$relations->belongsTo('issuer_certificate', self::class)
$relations->belongsTo('issuer_certificate', static::class)
->setForeignKey('subject_hash')
->setCandidateKey('issuer_hash');
$relations->belongsToMany('chain', X509CertificateChain::class)
->through(X509CertificateChainLink::class)
->setForeignKey('certificate_id');

$relations->hasMany('certificate', static::class)
->setForeignKey('issuer_hash')
->setCandidateKey('subject_hash');
$relations->hasMany('alt_name', X509CertificateSubjectAltName::class)
->setJoinType('LEFT');
$relations->hasMany('dn', X509Dn::class)
Expand Down

0 comments on commit d2b5622

Please sign in to comment.