Skip to content

Commit

Permalink
PAYARA-3111 removed duplicate code and added deployment group support
Browse files Browse the repository at this point in the history
  • Loading branch information
Cousjava committed Apr 25, 2019
1 parent 48987f9 commit 2f2dbf9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,6 @@ security.secureAdmin.instancealias=Instance Alias:
security.secureAdmin.instancealiasHelp=The alias that refers to the SSL/TLS certificate on the instances. This alias is used by the DAS to authenticate against the instances.
security.secureLabel=Secure Administration:

## Admin Audit
adminAudit.PageTitle=Admin Audit
adminaudit.PageHelp=Options for the admin commands audit system
adminaudit.Title=Admin Audit
adminaudit.Enabled=Enabled
adminaudit.EnabledHelp=Enable the admin audit service
adminaudit.Dynamic=Dynamic
adminaudit.DynamicHelp=Make the changes take effect immediately
adminaudit.configuration.availableNotifiers=Available Notifiers
adminaudit.configuration.selectedNotifiers=Selected Notifiers
adminaudit.link.to.notification.page.text.prefix=Selected Notifiers need to be enabled also in the
adminaudit.link.to.notification.page.text=Notification Service
adminaudit.link.to.notification.page.text.suffix=to receive notifications.
adminaudit.link.to.notification.page.text.prefix=


## Realms
realm.NewPageTitle=New Realm
realm.NewPageHelp=Create a new security (authentication) realm. Valid realm types are PAM, OSGi, File, Certificate, LDAP, JDBC, Digest, Oracle Solaris, and Custom.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
@PerLookup
@CommandLock(CommandLock.LockType.NONE)
@ExecuteOn({RuntimeType.DAS, RuntimeType.INSTANCE})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG,
CommandTarget.DEPLOYMENT_GROUP})
@RestEndpoints({
@RestEndpoint(configBean = AdminAuditConfiguration.class,
opType = RestEndpoint.OpType.GET,
Expand Down Expand Up @@ -159,7 +160,6 @@ public Class<Notifier> apply(Notifier input) {
}
}

// extraProperties.putAll(notifierProps);
}
}
notifiersReport.setMessage(notifiersColumnFormatter.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.glassfish.api.admin.RestEndpoint;
import org.glassfish.api.admin.RestEndpoints;
import org.glassfish.api.admin.RuntimeType;
import org.glassfish.api.admin.ServerEnvironment;
import org.glassfish.config.support.CommandTarget;
import org.glassfish.config.support.TargetType;
import org.glassfish.hk2.api.PerLookup;
Expand All @@ -79,7 +78,8 @@
@Service(name = "set-admin-audit-configuration")
@PerLookup
@ExecuteOn({RuntimeType.DAS, RuntimeType.INSTANCE})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG,
CommandTarget.DEPLOYMENT_GROUP})
@RestEndpoints({
@RestEndpoint(configBean = AdminAuditConfiguration.class,
opType = RestEndpoint.OpType.POST,
Expand Down Expand Up @@ -128,7 +128,7 @@ public Object run(AdminAuditConfiguration configurationProxy) throws PropertyVet
}
}, configuration);

if (dynamic && target.equals(SystemPropertyConstants.DAS_SERVER_NAME)) {
if (dynamic && target.equals("server-config")) {
auditService.setEnabled(enabled);
auditService.setAuditLevel(AuditLevel.valueOf(auditLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
@Service(name = "set-admin-audit-service-notifier-configuration")
@PerLookup
@ExecuteOn({RuntimeType.DAS, RuntimeType.INSTANCE})
@TargetType(value = {CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER, CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@TargetType(value ={CommandTarget.DEPLOYMENT_GROUP, CommandTarget.DAS, CommandTarget.STANDALONE_INSTANCE, CommandTarget.CLUSTER,
CommandTarget.CLUSTERED_INSTANCE, CommandTarget.CONFIG})
@RestEndpoints({
@RestEndpoint(configBean = AdminAuditConfiguration.class,
opType = RestEndpoint.OpType.POST,
Expand Down

0 comments on commit 2f2dbf9

Please sign in to comment.