Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Tinebase): use AuthConfig model in OVPN Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusweiss committed Aug 4, 2022
1 parent e3722b0 commit 0adb29e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tine20/Admin/Model/OVpnApi/AuthConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public static function inheritModelConfigHook(array &$_definition)
Zend_Filter_Input::PRESENCE => Zend_Filter_Input::PRESENCE_REQUIRED,
Zend_Validate_InArray::class => [true, false]
],
self::LABEL => 'is active', // _('is active')
self::DEFAULT_VAL => true, // otherwise new AuthConfigs are created inactive
self::LABEL => 'Is active', // _('Is active')
];
}

Expand Down
5 changes: 3 additions & 2 deletions tine20/Admin/js/OVpnApiConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class AuthConfig extends MFAPanel {
initComponent() {
this.dataPath = 'data.auth_configs';
// NOTE: this is wrong but we don't have a real account so let's work in the context of the current user (admin)
this.account = new Tine.Tinebase.Model.User({}, Tine.Tinebase.registry.get('currentAccount').accountId),
this.account = new Tine.Tinebase.Model.User({}, Tine.Tinebase.registry.get('currentAccount').accountId);
this.recordClass = Tine.Admin.Model.OVpnApi_AuthConfig;
super.initComponent();
}
onRender() {
Expand All @@ -24,7 +25,7 @@ class AuthConfig extends MFAPanel {

Tine.widgets.form.FieldManager.register('Admin', 'OVpnApiAccount', 'auth_configs', {
xtype: AuthConfig,
height: 120,
height: 300,
}, Tine.widgets.form.FieldManager.CATEGORY_EDITDIALOG);

Tine.Admin.registerItem({
Expand Down

0 comments on commit 0adb29e

Please sign in to comment.