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
dc39ef37
Commit
dc39ef37
authored
11 years ago
by
Florin Peter
Browse files
Options
Downloads
Patches
Plain Diff
changed recovery_enabled and migration_status columns to integer and fix tests
parent
5d572c34
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/appinfo/database.xml
+2
-2
2 additions, 2 deletions
apps/files_encryption/appinfo/database.xml
apps/files_encryption/tests/share.php
+6
-6
6 additions, 6 deletions
apps/files_encryption/tests/share.php
with
8 additions
and
8 deletions
apps/files_encryption/appinfo/database.xml
+
2
−
2
View file @
dc39ef37
...
...
@@ -22,14 +22,14 @@
</field>
<field>
<name>
recovery_enabled
</name>
<type>
boolean
</type>
<type>
integer
</type>
<notnull>
true
</notnull>
<default>
0
</default>
<comments>
Whether encryption key recovery is enabled
</comments>
</field>
<field>
<name>
migration_status
</name>
<type>
boolean
</type>
<type>
integer
</type>
<notnull>
true
</notnull>
<default>
0
</default>
<comments>
Whether encryption migration has been performed
</comments>
...
...
This diff is collapsed.
Click to expand it.
apps/files_encryption/tests/share.php
+
6
−
6
View file @
dc39ef37
...
...
@@ -452,7 +452,7 @@ 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_LINK
,
null
,
false
);
\OCP\Share
::
shareItem
(
'file'
,
$fileInfo
[
'fileid'
],
\OCP\Share
::
SHARE_TYPE_LINK
,
false
,
OCP\PERMISSION_ALL
);
// login as admin
$this
->
loginHelper
(
'admin'
);
...
...
@@ -572,7 +572,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
$this
->
assertTrue
(
$util
->
checkRecoveryPassword
(
'test123'
));
// enable recovery for admin
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
true
));
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
1
));
// create folder structure
$this
->
view
->
mkdir
(
'/admin/files'
.
$this
->
folder1
);
...
...
@@ -594,7 +594,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
$this
->
assertTrue
(
$this
->
view
->
file_exists
(
'/admin/files_encryption/share-keys/'
.
$this
->
folder1
.
$this
->
subfolder
.
$this
->
subsubfolder
.
'/'
.
$this
->
filename
.
'.'
.
$recoveryKeyId
.
'.shareKey'
));
// disable recovery for admin
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
false
));
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
0
));
// remove all recovery keys
$util
->
removeRecoveryKeys
(
'/'
);
...
...
@@ -604,7 +604,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
$this
->
assertFalse
(
$this
->
view
->
file_exists
(
'/admin/files_encryption/share-keys/'
.
$this
->
folder1
.
$this
->
subfolder
.
$this
->
subsubfolder
.
'/'
.
$this
->
filename
.
'.'
.
$recoveryKeyId
.
'.shareKey'
));
// enable recovery for admin
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
true
));
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
1
));
// remove all recovery keys
$util
->
addRecoveryKeys
(
'/'
);
...
...
@@ -639,7 +639,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
$util
=
new
\OCA\Encryption\Util
(
new
\OC_FilesystemView
(
'/'
),
'user1'
);
// enable recovery for admin
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
true
));
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
1
));
// create folder structure
$this
->
view
->
mkdir
(
'/user1/files'
.
$this
->
folder1
);
...
...
@@ -688,7 +688,7 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase
$this
->
assertFalse
(
$this
->
view
->
file_exists
(
'/user1/files_encryption/share-keys/'
.
$this
->
folder1
.
$this
->
subfolder
.
$this
->
subsubfolder
.
'/'
.
$this
->
filename
.
'.'
.
$recoveryKeyId
.
'.shareKey'
));
// enable recovery for admin
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
false
));
$this
->
assertTrue
(
$util
->
setRecoveryForUser
(
0
));
}
/**
...
...
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