code: function areSetStatePermissions(state) {
      try {
        return Object.prototype.hasOwnProperty.call(state.data, 'permissions');
      } catch (e) {
        return false;
      }
    }
docs: Checks if state has set permissions
  We check for hasOwnProperty, because ui-router lets the `data` property inherit from its parent
  @methodOf permission.ui.StatePermissionMap
  @private
  
  @returns {boolean}