Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(CLAPI): check for "Reach API *" fields in user instead of "Reach … #7117

Merged
merged 4 commits into from
Jan 16, 2019

Conversation

miteto
Copy link
Contributor

@miteto miteto commented Jan 9, 2019

…Centreon Front-end" when using CLAPI

  • remove check for "contact_oreon" field
  • remove check for "contact_admin" field
  • add check whether at least on of reach_api/reach_api_rt field is active
  • fix warning in user form

…Centreon Front-end" when using CLAPI

- remove check for "contact_oreon" field
- remove check for "contact_admin" field
- add check whether at least on of reach_api/reach_api_rt field is active
- fix warning in user form
if ($result === false) {
$isRemote = false;
} else {
$isRemote = array_map("myDecode", $DBRESULT->fetchRow());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$DBRESULT->fetchRow() will always return false, isn't it ?
Cause it is already called previously and I guess there is only one value for isRemote

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@loiclau
Copy link
Contributor

loiclau commented Jan 9, 2019

I think you change the clapi comportment, for me you just need to keep the delete of the query condition 'AND contact_oreon = '1''.

@miteto miteto merged commit c989fbf into master Jan 16, 2019
@miteto miteto deleted the MON-3275-clapi-permissions branch January 16, 2019 08:55
centreon-bot pushed a commit that referenced this pull request Jan 16, 2019
#7117)

* fix(CLAPI): check for "Reach API *" fields in user instead of "Reach Centreon Front-end" when using CLAPI

- remove check for "contact_oreon" field
- remove check for "contact_admin" field
- add check whether at least on of reach_api/reach_api_rt field is active
- fix warning in user form

* fix(typo): do not use fetchRow() twice

* fix(clapi): change check for permissions from reach_api* fields to contact_admin

* fix(enh): move closeCursor() outside of "if" condition
vhr pushed a commit that referenced this pull request Jan 23, 2019
#7117)

* fix(CLAPI): check for "Reach API *" fields in user instead of "Reach Centreon Front-end" when using CLAPI

- remove check for "contact_oreon" field
- remove check for "contact_admin" field
- add check whether at least on of reach_api/reach_api_rt field is active
- fix warning in user form

* fix(typo): do not use fetchRow() twice

* fix(clapi): change check for permissions from reach_api* fields to contact_admin

* fix(enh): move closeCursor() outside of "if" condition
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants