Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
84c67364
Commit
84c67364
authored
Oct 19, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add asc_getRights and Asc.c_oRights (from server config). Used to set singletone mode
parent
afd4249b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
common/Local/license.js
common/Local/license.js
+1
-0
common/Private/license.js
common/Private/license.js
+2
-1
common/apiCommon.js
common/apiCommon.js
+26
-1
No files found.
common/Local/license.js
View file @
84c67364
...
...
@@ -39,6 +39,7 @@ AscCommon.baseEditorsApi.prototype._onEndPermissions = function()
var
oResult
=
new
AscCommon
.
asc_CAscEditorPermissions
();
oResult
.
setLicenseType
(
Asc
.
c_oLicenseResult
.
Success
);
oResult
.
setCanBranding
(
true
);
oResult
.
setRights
(
Asc
.
c_oRights
.
Edit
);
this
.
sendEvent
(
'
asc_onGetEditorPermissions
'
,
oResult
);
}
};
\ No newline at end of file
common/Private/license.js
View file @
84c67364
...
...
@@ -40,7 +40,8 @@ AscCommon.baseEditorsApi.prototype._onEndPermissions = function () {
oResult
.
setLicenseType
(
type
);
oResult
.
setCanBranding
(
Asc
.
c_oLicenseResult
.
Error
!==
type
);
// Для тех, у кого есть лицензия, branding доступен
oResult
.
setIsLight
(
this
.
licenseResult
[
'
light
'
]);
oResult
.
setIsTrial
(
this
.
licenseResult
[
'
trial
'
]);
oResult
.
setTrial
(
this
.
licenseResult
[
'
trial
'
]);
oResult
.
setRights
(
this
.
licenseResult
[
'
rights
'
]);
}
this
.
sendEvent
(
'
asc_onGetEditorPermissions
'
,
oResult
);
}
...
...
common/apiCommon.js
View file @
84c67364
...
...
@@ -111,6 +111,14 @@
ExpiredTrial
:
6
};
var
c_oRights
=
{
None
:
0
,
Edit
:
1
,
Review
:
2
,
Comment
:
3
,
View
:
4
};
/**
* Класс asc_CAscEditorPermissions для прав редакторов
* -----------------------------------------------------------------------------
...
...
@@ -122,6 +130,8 @@
this
.
licenseType
=
c_oLicenseResult
.
Error
;
this
.
isLight
=
false
;
this
.
trial
=
false
;
this
.
rights
=
c_oRights
.
None
;
this
.
canCoAuthoring
=
true
;
this
.
canReaderMode
=
true
;
this
.
canBranding
=
false
;
...
...
@@ -158,6 +168,9 @@
asc_CAscEditorPermissions
.
prototype
.
asc_getTrial
=
function
()
{
return
this
.
trial
;
};
asc_CAscEditorPermissions
.
prototype
.
asc_getRights
=
function
()
{
return
this
.
rights
;
};
asc_CAscEditorPermissions
.
prototype
.
setLicenseType
=
function
(
v
)
{
this
.
licenseType
=
v
;
...
...
@@ -168,9 +181,12 @@
asc_CAscEditorPermissions
.
prototype
.
setIsLight
=
function
(
v
)
{
this
.
isLight
=
v
;
};
asc_CAscEditorPermissions
.
prototype
.
set
Is
Trial
=
function
(
v
)
{
asc_CAscEditorPermissions
.
prototype
.
setTrial
=
function
(
v
)
{
this
.
trial
=
v
;
};
asc_CAscEditorPermissions
.
prototype
.
setRights
=
function
(
v
)
{
this
.
rights
=
v
;
};
/** @constructor */
function
asc_ValAxisSettings
()
{
...
...
@@ -2683,6 +2699,14 @@
prot
[
'
Connections
'
]
=
prot
.
Connections
;
prot
[
'
ExpiredTrial
'
]
=
prot
.
ExpiredTrial
;
window
[
'
Asc
'
][
'
c_oRights
'
]
=
window
[
'
Asc
'
].
c_oRights
=
c_oRights
;
prot
=
c_oRights
;
prot
[
'
None
'
]
=
prot
.
None
;
prot
[
'
Edit
'
]
=
prot
.
Edit
;
prot
[
'
Review
'
]
=
prot
.
Review
;
prot
[
'
Comment
'
]
=
prot
.
Comment
;
prot
[
'
View
'
]
=
prot
.
View
;
window
[
"
AscCommon
"
].
asc_CAscEditorPermissions
=
asc_CAscEditorPermissions
;
prot
=
asc_CAscEditorPermissions
.
prototype
;
prot
[
"
asc_getLicenseType
"
]
=
prot
.
asc_getLicenseType
;
...
...
@@ -2694,6 +2718,7 @@
prot
[
"
asc_getIsAnalyticsEnable
"
]
=
prot
.
asc_getIsAnalyticsEnable
;
prot
[
"
asc_getIsLight
"
]
=
prot
.
asc_getIsLight
;
prot
[
"
asc_getTrial
"
]
=
prot
.
asc_getTrial
;
prot
[
"
asc_getRights
"
]
=
prot
.
asc_getRights
;
window
[
"
AscCommon
"
].
asc_ValAxisSettings
=
asc_ValAxisSettings
;
prot
=
asc_ValAxisSettings
.
prototype
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment