Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
ee852d7e
Commit
ee852d7e
authored
4 years ago
by
Daniel Calviño Sánchez
Browse files
Options
Downloads
Patches
Plain Diff
Add integration tests for default share permissions
Signed-off-by:
Daniel Calviño Sánchez
<
danxuliu@gmail.com
>
parent
b6dec0be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/integration/features/bootstrap/SharingContext.php
+1
-0
1 addition, 0 deletions
build/integration/features/bootstrap/SharingContext.php
build/integration/sharing_features/sharing-v1.feature
+34
-0
34 additions, 0 deletions
build/integration/sharing_features/sharing-v1.feature
with
35 additions
and
0 deletions
build/integration/features/bootstrap/SharingContext.php
+
1
−
0
View file @
ee852d7e
...
@@ -37,6 +37,7 @@ class SharingContext implements Context, SnippetAcceptingContext {
...
@@ -37,6 +37,7 @@ class SharingContext implements Context, SnippetAcceptingContext {
use
CommandLine
;
use
CommandLine
;
protected
function
resetAppConfigs
()
{
protected
function
resetAppConfigs
()
{
$this
->
modifyServerConfig
(
'core'
,
'shareapi_default_permissions'
,
'31'
);
$this
->
modifyServerConfig
(
'sharebymail'
,
'enforcePasswordProtection'
,
'no'
);
$this
->
modifyServerConfig
(
'sharebymail'
,
'enforcePasswordProtection'
,
'no'
);
}
}
}
}
This diff is collapsed.
Click to expand it.
build/integration/sharing_features/sharing-v1.feature
+
34
−
0
View file @
ee852d7e
...
@@ -357,6 +357,40 @@ Feature: sharing
...
@@ -357,6 +357,40 @@ Feature: sharing
|
url
|
AN_URL
|
|
url
|
AN_URL
|
|
mimetype
|
httpd/unix-directory
|
|
mimetype
|
httpd/unix-directory
|
Scenario
:
Creating a new share of a file with default permissions
Given
user
"user0"
exists
And
user
"user1"
exists
And
As an
"user0"
And
parameter
"shareapi_default_permissions"
of app
"core"
is set to
"7"
When
creating a share with
|
path
|
welcome.txt
|
|
shareWith
|
user1
|
|
shareType
|
0
|
And
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
Getting info of last share
Then
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
Share fields of last share match with
|
permissions
|
3
|
Scenario
:
Creating a new share of a folder with default permissions
Given
user
"user0"
exists
And
user
"user1"
exists
And
As an
"user0"
And
parameter
"shareapi_default_permissions"
of app
"core"
is set to
"7"
When
creating a share with
|
path
|
FOLDER
|
|
shareWith
|
user1
|
|
shareType
|
0
|
And
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
Getting info of last share
Then
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
Share fields of last share match with
|
permissions
|
7
|
Scenario
:
getting all shares of a user using that user
Scenario
:
getting all shares of a user using that user
Given
user
"user0"
exists
Given
user
"user0"
exists
And
user
"user1"
exists
And
user
"user1"
exists
...
...
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