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
7f3d7170
Commit
7f3d7170
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
Check which permissions are possible to re-share a file
parent
c3746e86
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/js/share.js
+16
-1
16 additions, 1 deletion
core/js/share.js
with
16 additions
and
1 deletion
core/js/share.js
+
16
−
1
View file @
7f3d7170
...
...
@@ -190,6 +190,7 @@ OC.Share={
}
html
+=
'
<br />
'
;
}
if
(
possiblePermissions
&
OC
.
PERMISSION_SHARE
)
{
// Determine the Allow Public Upload status.
// Used later on to determine if the
...
...
@@ -292,7 +293,21 @@ OC.Share={
var
shareWith
=
selected
.
item
.
value
.
shareWith
;
$
(
this
).
val
(
shareWith
);
// Default permissions are Edit (CRUD) and Share
var
permissions
=
OC
.
PERMISSION_ALL
;
// Check if these permissions are possible
var
permissions
=
OC
.
PERMISSION_READ
;
if
(
possiblePermissions
&
OC
.
PERMISSION_UPDATE
)
{
permissions
=
permissions
|
OC
.
PERMISSION_UPDATE
;
}
if
(
possiblePermissions
&
OC
.
PERMISSION_CREATE
)
{
permissions
=
permissions
|
OC
.
PERMISSION_CREATE
;
}
if
(
possiblePermissions
&
OC
.
PERMISSION_DELETE
)
{
permissions
=
permissions
|
OC
.
PERMISSION_DELETE
;
}
if
(
possiblePermissions
&
OC
.
PERMISSION_SHARE
)
{
permissions
=
permissions
|
OC
.
PERMISSION_SHARE
;
}
OC
.
Share
.
share
(
itemType
,
itemSource
,
shareType
,
shareWith
,
permissions
,
itemSourceName
,
function
()
{
OC
.
Share
.
addShareWith
(
shareType
,
shareWith
,
selected
.
item
.
label
,
permissions
,
possiblePermissions
);
$
(
'
#shareWith
'
).
val
(
''
);
...
...
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