Nasty has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/336581 )
Change subject: opPermitted method now checks for any operation set in
operationPermissions, not just create, update and delete
......................................................................
opPermitted method now checks for any operation set in
operationPermissions, not just create, update and delete
Change-Id: I65d9ac2a8d34707064fa9efd6c819343736d523a
(cherry picked from commit 9664971918ae6cd701f77fb73d53c27a0ea5b168)
---
M resources/bluespice.extjs/BS/CRUDPanel.js
1 file changed, 10 insertions(+), 13 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation
refs/changes/81/336581/1
diff --git a/resources/bluespice.extjs/BS/CRUDPanel.js
b/resources/bluespice.extjs/BS/CRUDPanel.js
index 3404668..77fbda0 100644
--- a/resources/bluespice.extjs/BS/CRUDPanel.js
+++ b/resources/bluespice.extjs/BS/CRUDPanel.js
@@ -130,18 +130,15 @@
setData: function( obj ) {
this.currentData = obj;
},
- //return boolean if param exists, otherwise null
- opPermitted: function ( operation ) {
- switch( operation ) {
- case 'create':
- return this.operationPermissions.create;
- case 'update':
- return this.operationPermissions.update;
- case 'delete':
- return this.operationPermissions.delete;
- default:
- return null;
- }
+ /**
+ * @return boolean if param exists, otherwise null
+ */
+ opPermitted: function ( operation ) {
+ if( operation in this.operationPermissions ) {
+ return this.operationPermissions[operation];
+ } else {
+ return null;
+ }
}
-});
\ No newline at end of file
+});
--
To view, visit https://gerrit.wikimedia.org/r/336581
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d9ac2a8d34707064fa9efd6c819343736d523a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Nasty <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits