4217 Commits

Author SHA1 Message Date
Alexander Klimov
febb2d1ae2 ProgrammingError: extend IcingaException
refs #6931
2014-08-26 11:15:19 +02:00
Alexander Fuhr
d8bbd7a0a0 Merge branch 'bugfix/modules-dashlet-provider-6639'
fixes #6639
2014-08-26 10:57:37 +02:00
Alexander Klimov
4ec6dbe3f0 Prefer single quotes ' rather than double quotes " 2014-08-26 10:41:17 +02:00
Alexander Fuhr
42e2b34356 Implement self provided configuration for dashboard/dashlets in modules
refs #6639
2014-08-26 10:34:36 +02:00
Alexander Klimov
f754531e4d Fix grammatical error 2014-08-26 10:22:14 +02:00
Johannes Meyer
52534a2f46 It is a form's responsibility to process the request it was submitted with
How forms are being validated should not be a task that is part of the
controller action, but should be handled by the form base class as it is
most of the time the same procedure. Now a controller action just sets
up the form to use, calls handleRequest() and acts upon its return value.
(e.g. calling handleRequest() from another form or any redirection)

refs #5525
2014-08-25 17:06:45 +02:00
Johannes Meyer
c93ab7951d Check whether a form's data was sent instead of whether it's complete
It is not sufficient to just check whether all required elements are being
submitted. We definetely need to check whether the submit button was
pressed. But doing this and providing a standard button with a static name
simultaneously will produce conflicts if forms are using the same action
urls. To fix this, we'll add an additional form-identification check by using
a form's name or class.

refs #5525
2014-08-25 16:49:54 +02:00
Alexander Klimov
7074fa1331 NotWritableError: extend IcingaException
refs #6931
2014-08-25 12:56:35 +02:00
Alexander Klimov
6c9947326d NotReadableError: extend IcingaException
refs #6931
2014-08-25 12:38:34 +02:00
Alexander Klimov
f4dbb4df96 NotImplementedError: extend IcingaException
refs #6931
2014-08-25 12:21:59 +02:00
Alexander Klimov
013aad8f73 MissingParameterException: extend IcingaException
refs #6931
2014-08-25 12:14:18 +02:00
Johannes Meyer
7b221e2aba It should not be a form's responsibility how its submit button should look..
...in case it's a standard button. No need to be DRY here.

refs #5525
2014-08-22 15:20:54 +02:00
Johannes Meyer
2b879b344f Do not populate using createElements() and fix documentation blocks
refs #5525
2014-08-22 12:04:14 +02:00
Alexander Klimov
9c5878cbbe ConfigurationError: extend IcingaException
refs #6931
2014-08-22 11:46:11 +02:00
Alexander Fuhr
20cead67a6 Merge branch 'master' into bugfix/modules-menu-provider-6639 2014-08-22 11:44:10 +02:00
Alexander Fuhr
1886569174 Implement Module self provided configuration for menus
refs #6639
2014-08-22 11:35:42 +02:00
Johannes Meyer
bc05d2ee64 Merge LoggingForm into GeneralForm
fixes #6933
2014-08-22 11:05:20 +02:00
Alexander Klimov
b764993091 AuthenticationException: extend IcingaException
refs #6931
2014-08-22 10:59:52 +02:00
Alexander Klimov
b55a313146 Implement IcingaException
refs #6931
2014-08-22 10:27:30 +02:00
Thomas Gelf
09412d03b6 Benchmark: hide timestamp on HTML output
Wastes space and is mostly useless, absolut and relative expired time
gives more than enough information.
2014-08-22 09:34:43 +02:00
Alexander Klimov
8733238a6e Loader::registerNamespace(): correct exception message 2014-08-21 12:40:41 +02:00
Johannes Meyer
bb7972aa39 Merge branch 'master' into bugfix/rebuild-form-builder-5525
Conflicts:
	application/controllers/AuthenticationController.php
	application/controllers/ConfigController.php
	application/forms/Authentication/LoginForm.php
	application/forms/Preference/GeneralForm.php
	modules/monitoring/application/controllers/ChartController.php
2014-08-20 13:13:50 +02:00
Eric Lippmann
995355ec30 lib/Limiter: fix translate w/ sprintf 2014-08-19 16:29:11 +02:00
Thomas Gelf
f49a34625e Url\Params: check for QUERY_STRING before using it
fixes #6957
2014-08-19 14:53:56 +02:00
Eric Lippmann
1c74fd7028 Merge branch 'master' into feature/display-documentation-4820
Conflicts:
	modules/doc/library/Doc/DocParser.php
2014-08-19 13:39:48 +02:00
Thomas Gelf
db3ef8fbd0 ActionController: remove redirectToLogin default
The redirectOnLogin function now doesn't have any predefined default.
This also leads to the behaviour that "Logout" will not redirect you
anywhere on a new login while "forcibly being logged out" (e.g. by
logging out in another browser tab) will bring you back to where you
came from.
2014-08-19 12:28:24 +02:00
Thomas Gelf
a38d71f17c Cli\Command: provide Config()
This makes it feel more like action controllers

fixes #6954
2014-08-19 10:27:26 +02:00
Thomas Gelf
9d4a4f49c9 ActionController: JS should redirect to __SELF__...
...once you lost your session. That's the only way to do this in a
smooth way. When the server get's an unauthenticated request for a
single container, redirecting to auth/login?redir=<that-container>
was not what you expect.

Together with JS handling __SELF__ in redirection URLs this will
play fine.

refs #6935
2014-08-19 09:57:24 +02:00
Thomas Gelf
b9cc964e24 Url\Params: remove() should reindex on change
There was a small bug, fixed.

refs #6699
2014-08-19 09:49:53 +02:00
Thomas Gelf
344909dfcd Web\UrlParams: add() and set() should encode...
...while there is now a addEncoded function, mostly for internal use.

refs #6699
2014-08-19 09:45:58 +02:00
Thomas Gelf
217595dc15 Web/Url: more intuitive separator usage
One might not expect to get a URL with params separated by &amp; while
this is the correct way of writing them to HTML attributes. So default
behaviour is right now that all functions return URL params separated
by &, but if you cast a URL (or it's params) to a string, &amp; will be
used.

Additionally there are toString functions allowing you to choose the
separator "manually".

refs #6699
2014-08-19 09:42:16 +02:00
Thomas Gelf
7caccd7691 Web\Url: remove stripUrlFragment()
This function had an interesting history and seems to be a result of
missunderstanding of each others commits. Removed, as the fragment is
already there.

refs #6699
2014-08-19 09:36:15 +02:00
Johannes Meyer
f2ed813c9a Fix that Icinga\Web\Url::fromPath drops fragments
fixes #6284
2014-08-14 14:23:31 +02:00
Johannes Meyer
4ddc0e718b Report the default language also as being available for setting up the locale
fixes #6905
2014-08-14 10:48:52 +02:00
Johannes Meyer
dc8181cdc5 Escape linefeeds and carriage returns in commands and show them as html
fixes #6088
2014-08-14 10:23:04 +02:00
Johannes Meyer
666591beb7 Encode url before passing it to Icinga\Form\Dashboard\AddUrlForm
fixes #6611
2014-08-13 16:41:40 +02:00
Johannes Meyer
7311ab964e Do not set the full url from the request as action with form parameters
Setting an url with parameters named like form elements in a form with
method POST causes Zend to ignore any POST data because GET will be
processed with higher priority.

fixes #6806
2014-08-13 14:50:21 +02:00
Johannes Meyer
e7da9c0a00 Make our anti CSRF logic being a form element
refs #5525
2014-08-12 14:43:10 +02:00
Johannes Meyer
fe63ce664f Make use if 'ignore´ instead of explicitly unsetting array keys
refs #5525
2014-08-12 13:57:28 +02:00
Johannes Meyer
4b1169c0a1 Fix improper form submission
refs #5525
2014-08-12 10:41:19 +02:00
Thomas Gelf
8f729bfb65 ActionController: set a default window title
In case a controller action didn't set a view title this fix restores
the default title on XHR requests.

fixes #6797
2014-07-31 17:04:26 +02:00
Marius Hein
56a29354d3 AutoLogin: Check the remote username against logged in user
fixes #6462
2014-07-30 12:54:08 +02:00
Marius Hein
e2c761a7aa AutoLogin/Logout: Remove own session namespace
Store data in the user and implement interface to left
backends store remote information.

fixes #6461
2014-07-30 12:35:55 +02:00
Eric Lippmann
294728ac47 Revert "Autologin: Test logged session against remote user"
This reverts commit 64954e99244f26cc6b6dccc7d60a253c105bd550.

If the strip_username_regex is configured on the autologin backend and applies on a user's name,
the authenticated user's username does never match the REMOTE_USER server variable.
Thus the application will logout/login on every request which results in a redirect loop.

refs #6462
2014-07-29 17:50:44 +02:00
Marius Hein
64954e9924 Autologin: Test logged session against remote user
fixes #6462
2014-07-29 12:06:43 +02:00
Marius Hein
8b9d446d2e Autologin: Remove deprecated autologin methods
Remove methods from manager because autologin
is now handled with special backends (AutoLoginBackend).

The session is used to store the status about a remote
user authentication to send a 401 header to the client
upon logout.

refs #6461
2014-07-29 10:48:57 +02:00
Eric Lippmann
edc89d6ad6 lib: Remove `NodeRenderer'
`NodeRenderer' is superseded by `TocRenderer'.
2014-07-28 19:12:35 +02:00
Eric Lippmann
e26d360561 lib/Node: Remove method `findNodeBy()'
The new `DocTree' class provides `getNode()'.
2014-07-28 19:07:13 +02:00
Eric Lippmann
bbcdcb4609 lib: Add `Identifiable' interface for objects that are identifiable by an ID of any type 2014-07-28 19:05:37 +02:00
Johannes Meyer
c3731fa79e Adjust removeresource-action to suit the new resource form interface
refs #5525
2014-07-24 16:17:30 +02:00