15
15
use OCA \Libresign \Service \IdentifyMethodService ;
16
16
use OCA \Libresign \Service \SignatureBackgroundService ;
17
17
use OCA \Libresign \Service \SignatureTextService ;
18
+ use OCA \Libresign \Service \Certificate \RulesService ;
18
19
use OCP \AppFramework \Http \TemplateResponse ;
19
20
use OCP \AppFramework \Services \IInitialState ;
20
21
use OCP \IAppConfig ;
@@ -30,6 +31,7 @@ public function __construct(
30
31
private IAppConfig $ appConfig ,
31
32
private SignatureTextService $ signatureTextService ,
32
33
private SignatureBackgroundService $ signatureBackgroundService ,
34
+ private RulesService $ rulesService ,
33
35
) {
34
36
}
35
37
public function getForm (): TemplateResponse {
@@ -44,6 +46,7 @@ public function getForm(): TemplateResponse {
44
46
$ this ->initialState ->provideInitialState ('certificate_engine ' , $ this ->certificateEngineFactory ->getEngine ()->getName ());
45
47
$ this ->initialState ->provideInitialState ('certificate_policies_oid ' , $ this ->certificatePolicyService ->getOid ());
46
48
$ this ->initialState ->provideInitialState ('certificate_policies_cps ' , $ this ->certificatePolicyService ->getCps ());
49
+ $ this ->initialState ->provideInitialState ('rules_service ' , $ this ->rulesService ->toArray ());
47
50
$ this ->initialState ->provideInitialState ('config_path ' , $ this ->appConfig ->getValueString (Application::APP_ID , 'config_path ' ));
48
51
$ this ->initialState ->provideInitialState ('default_signature_font_size ' , SignatureTextService::SIGNATURE_DEFAULT_FONT_SIZE );
49
52
$ this ->initialState ->provideInitialState ('default_signature_height ' , SignatureTextService::DEFAULT_SIGNATURE_HEIGHT );
0 commit comments