public UserGroupServicePanel(String id, IModel<T> model) { super(id, model); add(new PasswordEncoderChoice("passwordEncoderName").add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { if (recodeCheckBox.isVisible()) { recodeCheckBox.setEnabled(true); target.addComponent(recodeCheckBox); } } })); boolean canCreateStore=false; SecurityUserGroupServiceConfig config = model.getObject(); try { GeoServerUserGroupService s = (GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance(); canCreateStore=s.canCreateStore(); } catch (Exception e) { // do nothing } recodeCheckBox= new CheckBox("recodeExistingPasswords", Model.of(false)); recodeCheckBox.setOutputMarkupId(true); recodeCheckBox.setVisible(canCreateStore); recodeCheckBox.setEnabled(false); add(recodeCheckBox); add(new PasswordPolicyChoice("passwordPolicyName")); }
public EncryptionPanel(String id) { super(id, new Model()); GeoServerSecurityManager secMgr = getSecurityManager(); if (secMgr.isStrongEncryptionAvailable()) { add(new Label("strongEncryptionMsg", new StringResourceModel("strongEncryption", this, null)) .add(new AttributeAppender("class", new Model("info-link"), " "))); } else { add(new Label("strongEncryptionMsg", new StringResourceModel("noStrongEncryption", this, null)) .add(new AttributeAppender("class", new Model("warning-link"), " "))); } add(new CheckBox("encryptingUrlParams")); //load only reversible encoders add(new PasswordEncoderChoice("configPasswordEncrypterName", getSecurityManager().loadPasswordEncoders(null, true, null))); } }
public EncryptionPanel(String id) { super(id, new Model()); GeoServerSecurityManager secMgr = getSecurityManager(); if (secMgr.isStrongEncryptionAvailable()) { add(new Label("strongEncryptionMsg", new StringResourceModel("strongEncryption", this, null)) .add(new AttributeAppender("class", new Model("info-link"), " "))); } else { add(new Label("strongEncryptionMsg", new StringResourceModel("noStrongEncryption", this, null)) .add(new AttributeAppender("class", new Model("warning-link"), " "))); } add(new CheckBox("encryptingUrlParams")); //load only reversible encoders add(new PasswordEncoderChoice("configPasswordEncrypterName", getSecurityManager().loadPasswordEncoders(null, true, null))); } }
public UserGroupServicePanel(String id, IModel<T> model) { super(id, model); add(new PasswordEncoderChoice("passwordEncoderName").add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { if (recodeCheckBox.isVisible()) { recodeCheckBox.setEnabled(true); target.addComponent(recodeCheckBox); } } })); boolean canCreateStore=false; SecurityUserGroupServiceConfig config = model.getObject(); try { GeoServerUserGroupService s = (GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance(); canCreateStore=s.canCreateStore(); } catch (Exception e) { // do nothing } recodeCheckBox= new CheckBox("recodeExistingPasswords", Model.of(false)); recodeCheckBox.setOutputMarkupId(true); recodeCheckBox.setVisible(canCreateStore); recodeCheckBox.setEnabled(false); add(recodeCheckBox); add(new PasswordPolicyChoice("passwordPolicyName")); }
public EncryptionPanel(String id) { super(id, new Model()); GeoServerSecurityManager secMgr = getSecurityManager(); if (secMgr.isStrongEncryptionAvailable()) { add( new Label( "strongEncryptionMsg", new StringResourceModel("strongEncryption", this, null)) .add(new AttributeAppender("class", new Model("info-link"), " "))); } else { add( new Label( "strongEncryptionMsg", new StringResourceModel("noStrongEncryption", this, null)) .add( new AttributeAppender( "class", new Model("warning-link"), " "))); } add(new CheckBox("encryptingUrlParams")); // load only reversible encoders add( new PasswordEncoderChoice( "configPasswordEncrypterName", getSecurityManager().loadPasswordEncoders(null, true, null))); } }
public UserGroupServicePanel(String id, IModel<T> model) { super(id, model); add( new PasswordEncoderChoice("passwordEncoderName") .add( new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { if (recodeCheckBox.isVisible()) { recodeCheckBox.setEnabled(true); target.add(recodeCheckBox); } } })); boolean canCreateStore = false; SecurityUserGroupServiceConfig config = model.getObject(); try { GeoServerUserGroupService s = (GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance(); canCreateStore = s.canCreateStore(); } catch (Exception e) { // do nothing } recodeCheckBox = new CheckBox("recodeExistingPasswords", Model.of(false)); recodeCheckBox.setOutputMarkupId(true); recodeCheckBox.setVisible(canCreateStore); recodeCheckBox.setEnabled(false); add(recodeCheckBox); add(new PasswordPolicyChoice("passwordPolicyName")); }