PackageAction.js 874 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Content Explorer
  5. *| (C) Copyright IBM Corp. 2015, 2018
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or disclosure
  8. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *+------------------------------------------------------------------------+
  10. */
  11. import { ContentStoreObject } from '@businessanalytics/content-nav';
  12. class PackageAction {
  13. constructor() {
  14. }
  15. isDefaultActionView = (payLoad) => {
  16. const defaultAction = payLoad[ContentStoreObject.DEFAULT_PORTAL_ACTION];
  17. if (defaultAction && defaultAction ==='view') {
  18. return true;
  19. }
  20. return false;
  21. }
  22. canExecute = (payLoad) => {
  23. return ContentStoreObject.hasPermissions(payLoad, ['traverse']);
  24. }
  25. }
  26. export default new PackageAction();