*/\r
public static function preShared($params) {\r
\r
+ $l = new \OC_L10N('files_encryption');\r
$users = array();\r
$view = new \OC\Files\View('/public-keys/');\r
\r
\r
if (count($notConfigured) > 0) {\r
$params['run'] = false;\r
- $params['error'] = 'Following users are not set up for encryption: ' . join(', ' , $notConfigured);\r
+ $params['error'] = $l->t('Following users are not set up for encryption:') . ' ' . join(', ' , $notConfigured);\r
}\r
\r
}\r
\OC_FileProxy::$enabled = $proxyStatus;
// share the file
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL);
-
+ try {
+ \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL);
+ } catch (Exception $e) {
+ $this->assertEquals(0, strpos($e->getMessage(), "Following users are not set up for encryption"));
+ }
+
+
// login as admin
\Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1);