Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
69173c2a
Commit
69173c2a
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
fix test and make warning translatable
parent
92536273
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_encryption/hooks/hooks.php
+2
-1
2 additions, 1 deletion
apps/files_encryption/hooks/hooks.php
apps/files_encryption/tests/share.php
+7
-2
7 additions, 2 deletions
apps/files_encryption/tests/share.php
with
9 additions
and
3 deletions
apps/files_encryption/hooks/hooks.php
+
2
−
1
View file @
69173c2a
...
...
@@ -238,6 +238,7 @@ class Hooks {
*/
public
static
function
preShared
(
$params
)
{
$l
=
new
\OC_L10N
(
'files_encryption'
);
$users
=
array
();
$view
=
new
\OC\Files\View
(
'/public-keys/'
);
...
...
@@ -259,7 +260,7 @@ class Hooks {
if
(
count
(
$notConfigured
)
>
0
)
{
$params
[
'run'
]
=
false
;
$params
[
'error'
]
=
'Following users are not set up for encryption: '
.
join
(
', '
,
$notConfigured
);
$params
[
'error'
]
=
$l
->
t
(
'Following users are not set up for encryption:
'
)
.
'
'
.
join
(
', '
,
$notConfigured
);
}
}
...
...
This diff is collapsed.
Click to expand it.
apps/files_encryption/tests/share.php
+
7
−
2
View file @
69173c2a
...
...
@@ -881,8 +881,13 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase {
\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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment