Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #5013] Command API broken #1234

Closed
icinga-migration opened this issue Nov 6, 2013 · 1 comment
Closed

[dev.icinga.com #5013] Command API broken #1234

icinga-migration opened this issue Nov 6, 2013 · 1 comment

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/5013

Created by mhein on 2013-11-06 11:28:17 +00:00

Assignee: mhein
Status: Resolved (closed on 2013-11-06 11:33:07 +00:00)
Target Version: 1.10.1
Last Update: 2013-11-06 11:33:07 +00:00 (in Redmine)

Icinga Version: 1.10.0
Icinga Web Version: 1.9.2
IDO Version: 1.10.0
OS Version: F19
DB Type: MySQL
DB Version: ---
Browser Version: any

Return always success and nothing happens ;-)

        try {
            if($this->context->getUser()->getNsmUser()->getTarget('IcingaCommandRo')) {
                $errors = array('Commands are disabled for this user');
                $this->getContainer()->setAttributeByRef('errors', $errors, 'org.icinga.api.auth');
                $this->getContainer()->setAttribute('success', false, 'org.icinga.api.auth');
            }
            return array('Api', 'GenericError');
            ^------- Always stops here if no error

        } catch (AppKitDoctrineException $e) {
            // PASS
        }

Changesets

2013-11-06 11:28:58 +00:00 by mhein 5787803

Fix command API

fixes #5013

2014-02-18 12:38:20 +00:00 by mfrosch fd76752

Removed unnecessary try/catch block on ApiCommand.

Adopted from GitHub pull request ##1

Fixes #5465
Refs #5013

Relations:

@icinga-migration
Copy link
Author

Updated by mhein on 2013-11-06 11:33:07 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Applied in changeset 5787803.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant