diff --git a/caps/src/nsCCapsManager.cpp b/caps/src/nsCCapsManager.cpp index 0cbb3059e1b..6f9354da5fa 100644 --- a/caps/src/nsCCapsManager.cpp +++ b/caps/src/nsCCapsManager.cpp @@ -28,6 +28,7 @@ static NS_DEFINE_CID(kCCapsManagerCID, NS_CCAPSMANAGER_CID); static NS_DEFINE_IID(kICapsManagerIID, NS_ICAPSMANAGER_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); +#define ALL_JAVA_PERMISSION "AllJavaPermission" //////////////////////////////////////////////////////////////////////////// // from nsISupports and AggregatedQueryInterface: @@ -125,7 +126,7 @@ nsCCapsManager::GetPermission(nsIPrincipal* pNSIPrincipal, nsITarget* ignoreTarget, nsPermission *state) { - nsTarget *target = nsTarget::findTarget("AllPermission"); + nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION); nsresult result = NS_OK; if( target == NULL ) { @@ -163,7 +164,7 @@ nsCCapsManager::SetPermission(nsIPrincipal* pNSIPrincipal, nsITarget* ignoreTarget, nsPermission state) { - nsTarget *target = nsTarget::findTarget("AllPermission"); + nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION); nsresult result = NS_OK; if( target == NULL ) { @@ -197,7 +198,7 @@ nsCCapsManager::AskPermission(nsIPrincipal* pNSIPrincipal, nsITarget* ignoreTarget, nsPermission *state) { - nsTarget *target = nsTarget::findTarget("AllPermission"); + nsTarget *target = nsTarget::findTarget(ALL_JAVA_PERMISSION); nsresult result = NS_OK; if( target == NULL ) { diff --git a/caps/src/nsTarget.cpp b/caps/src/nsTarget.cpp index 8e4982ed7ea..dc395e5f168 100755 --- a/caps/src/nsTarget.cpp +++ b/caps/src/nsTarget.cpp @@ -217,6 +217,11 @@ extern int CAPS_TARGET_URL_ACCOUNT_SETUP; extern int CAPS_TARGET_DESC_CONSTELLATION; extern int CAPS_TARGET_DETAIL_DESC_CONSTELLATION; extern int CAPS_TARGET_URL_CONSTELLATION; + +extern int CAPS_TARGET_DESC_ALL_JAVA_PERMISSION; +extern int CAPS_TARGET_DETAIL_DESC_ALL_JAVA_PERMISSION; +extern int CAPS_TARGET_URL_ALL_JAVA_PERMISSION; + extern int CAPS_TARGET_RISK_COLOR_HIGH; extern int CAPS_TARGET_RISK_COLOR_HIGH; @@ -1124,6 +1129,17 @@ PRBool CreateSystemTargets(nsPrincipal *sysPrin) JavaSecUI_getHelpURL(CAPS_TARGET_URL_CONSTELLATION), targetPtrArray); target->registerTarget(); + + + /* Permission to All privileges in Java */ + target = new nsUserTarget("AllJavaPermission", sysPrin, + targetRiskHigh, + targetRiskColorHigh, + JavaSecUI_getString(CAPS_TARGET_DESC_ALL_JAVA_PERMISSION), + JavaSecUI_getString(CAPS_TARGET_DETAIL_DESC_ALL_JAVA_PERMISSION), + JavaSecUI_getHelpURL(CAPS_TARGET_URL_ALL_JAVA_PERMISSION)); + target->registerTarget(); + return PR_TRUE; }