mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-13232 do not duplicate isMacOsCredentialStoreSupported
This commit is contained in:
+5
-4
@@ -13,8 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.passwordSafe.impl.providers.masterKey;
|
||||
package com.intellij.credentialStore;
|
||||
|
||||
import com.intellij.credentialStore.macOs.MacOsKeychainLibraryKt;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.ui.ValidationInfo;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
@@ -25,7 +26,7 @@ import java.util.function.Function;
|
||||
/**
|
||||
* @author gregsh
|
||||
*/
|
||||
public class EnterPasswordComponent extends PasswordComponentBase {
|
||||
class EnterPasswordComponent extends PasswordComponentBase {
|
||||
@NotNull
|
||||
private final Function<String, Boolean> myPasswordConsumer;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class EnterPasswordComponent extends PasswordComponentBase {
|
||||
myPasswordConsumer = passwordConsumer;
|
||||
|
||||
String note;
|
||||
if (SystemInfo.isMacIntel64 && SystemInfo.isMacOSLeopard) {
|
||||
if (MacOsKeychainLibraryKt.isMacOsCredentialStoreSupported()) {
|
||||
note = "The passwords will be stored in the system MacOS keychain.";
|
||||
}
|
||||
else if (SystemInfo.isLinux) {
|
||||
@@ -43,7 +44,7 @@ public class EnterPasswordComponent extends PasswordComponentBase {
|
||||
note = "The passwords will be stored in the KeePass database protected by your Windows account.";
|
||||
}
|
||||
else {
|
||||
String subNote = SystemInfo.isMacIntel64 ? "at least OS X 10.5 is required" : "your OS is not supported, please file issue";
|
||||
String subNote = SystemInfo.isMacIntel64 ? "at least OS X 10.5 is required<br>to store in the system MacOS keychain" : "your OS is not supported, please file issue";
|
||||
note = "The passwords will be stored in IDE configuration files with weak protection (" + subNote + ").";
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.passwordSafe.impl.providers.masterKey;
|
||||
package com.intellij.credentialStore;
|
||||
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.ValidationInfo;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordComponentBase">
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.credentialStore.PasswordComponentBase">
|
||||
<grid id="27dc6" binding="myRootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
+3
-3
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.passwordSafe.impl.providers.masterKey;
|
||||
package com.intellij.credentialStore;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.ui.ValidationInfo;
|
||||
@@ -25,7 +25,7 @@ import javax.swing.*;
|
||||
/**
|
||||
* @author gregsh
|
||||
*/
|
||||
public abstract class PasswordComponentBase {
|
||||
abstract class PasswordComponentBase {
|
||||
private JPanel myRootPanel;
|
||||
private JLabel myIconLabel;
|
||||
protected JLabel myPromptLabel;
|
||||
@@ -55,4 +55,4 @@ public abstract class PasswordComponentBase {
|
||||
public String getHelpId() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.passwordSafe.impl.providers.masterKey;
|
||||
package com.intellij.credentialStore;
|
||||
|
||||
import com.intellij.ide.passwordSafe.impl.providers.ByteArrayWrapper;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
|
||||
@Deprecated
|
||||
@State(name = "PasswordDatabase", storages = @Storage(value = "security.xml", roamingType = RoamingType.DISABLED, deprecated = true))
|
||||
public class PasswordDatabase implements PersistentStateComponent<PasswordDatabase.State> {
|
||||
class PasswordDatabase implements PersistentStateComponent<PasswordDatabase.State> {
|
||||
private final static Logger LOG = Logger.getInstance(PasswordDatabase.class.getName());
|
||||
|
||||
public transient final Map<ByteArrayWrapper, byte[]> myDatabase = new HashMap<>();
|
||||
@@ -18,9 +18,6 @@ package com.intellij.credentialStore
|
||||
import com.intellij.ide.ApplicationLoadListener
|
||||
import com.intellij.ide.passwordSafe.impl.providers.ByteArrayWrapper
|
||||
import com.intellij.ide.passwordSafe.impl.providers.EncryptionUtil
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.EnterPasswordComponent
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.MasterPasswordDialog
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.windows.WindowsCryptUtils
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.PathManager
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package com.intellij.credentialStore
|
||||
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.MasterKeyPasswordSafeTest
|
||||
import com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase
|
||||
import com.intellij.openapi.util.JDOMUtil
|
||||
import com.intellij.testFramework.ApplicationRule
|
||||
import com.intellij.testFramework.runInEdtAndWait
|
||||
|
||||
@@ -157,8 +157,7 @@
|
||||
<applicationService serviceInterface="com.intellij.openapi.keymap.impl.DefaultKeymap"
|
||||
serviceImplementation="com.intellij.openapi.keymap.impl.DefaultKeymap"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"
|
||||
serviceImplementation="com.intellij.ide.passwordSafe.impl.providers.masterKey.PasswordDatabase"/>
|
||||
<applicationService serviceImplementation="com.intellij.credentialStore.PasswordDatabase"/>
|
||||
<applicationService serviceInterface="com.intellij.credentialStore.PasswordSafeSettings"
|
||||
serviceImplementation="com.intellij.credentialStore.PasswordSafeSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.ide.passwordSafe.PasswordSafe"
|
||||
|
||||
Reference in New Issue
Block a user