Commit Graph

215 Commits

Author SHA1 Message Date
Khanh Ngo
9506315a46 manage records_allow_to_edit setting in DB 2018-08-22 08:36:53 +07:00
Khanh Ngo
74a7b5a3b7 Migrate more config values to db 2018-08-21 13:26:27 +07:00
Khanh Ngo
8af7a6ac9e
Adjustment in travis ci configs. Fix importing during first time running db upgrade 2018-08-20 17:21:32 +07:00
Khanh Ngo
0b7580c82f
Read powerdns api setting from DB 2018-08-20 09:59:19 +07:00
Khanh Ngo
f8f4ddcc85
Add validation for authentication setting form 2018-08-19 22:08:14 +07:00
Khanh Ngo
babf62bae0
Fix Github/Google oAuth 2018-08-19 15:29:50 +07:00
Khanh Ngo
ada6f844ff
Read LDAP config from DB instead of file. Adjustment in site titles 2018-08-18 22:42:18 +07:00
Khanh Ngo
4b9349c83e
Create DB config for pdns and authentication setting 2018-08-18 18:41:59 +07:00
Khanh Ngo
7b5c74cc7d
Merge pull request #330 from tmuncks/add-user-edit
Add option to edit users from the comfort of the UI
2018-08-14 08:52:20 +07:00
Thomas M Steenholdt
fe4616d609 Do user.otp_secret check properly 2018-08-13 01:33:29 -02:00
Thomas M Steenholdt
539e6bc562 Fix double refresh when activating 2FA
When toggling Two Factor Authentication, it often takes a few tries to get it to work.
The toggle function ends up reloading the page in two different places, effectively creating a race condition.

This fixes that problem

(cherry picked from commit 6b9fc897bc02ff857a968e76ed49f1b0f2108bb5)
2018-08-12 07:48:34 -02:00
Thomas M Steenholdt
0ac33aa3c4 Add option to edit users from the comfort of the UI
Update user management feature to allow editing user details directly in the admin user interface.

Also added an option to reset the two factor authentication data of a user, for when that's needed (lost device, technical issues etc).

(cherry picked from commit 3139616282a18c11463c6ecf78888417b2ac1c35)
2018-08-12 07:47:37 -02:00
Khanh Ngo
178e25f8f7
Fix domain table modal to prevent removing several record at the same time 2018-07-05 13:58:27 +07:00
Khanh Ngo
d9baaa4d60 Fix #302 2018-07-05 09:57:08 +07:00
Thomas M Steenholdt
31305a3048 Add setting to allow/disallow quick editing of records
Adds an `allow_quick_edit` setting, using the improved setting handling logic from PR #287 to toggle whether records are editable by simply clicking the row or not.

Aims to fix #288
2018-06-24 00:25:33 -02:00
Thomas M Steenholdt
6c8a3ac36c Move setting definitions into code (rather than database).
For a setting to be useful, the code has to be able to make sense of it anyway. For this reason it makes sense, that the available settings are defined within the code, rather than in the database, where a missing row has previously caused problems. Instead, settings are now written to the database, when they are changed.

So instead of relying on the database initialization process to create all available settings for us in the database, the supported settings and their defaults are now in a `defaults` dict in the Setting class. With this in place, we can stop populating the `setting` table as a part of database initialization and it will be much easier to support new settings in the future (we no longer need to do anything to the database, to achieve that).

Another benefit is that any changes to default values will take effect automatically, unless the admin has already modified that setting to his/her liking.

To make it easier to get the value of a setting, falling back to defaults etc, a new function `get` has been added to the Setting class. Call it as `Setting().get('setting_name'), and it will take care of returning a setting from the database or return the default value for that setting, if nothing was found.

The `get` function returns `None`, if the setting passed to the function, does not exist in the `Setting.defaults` dict - Indicating that we don't know of a setting by that name.
2018-06-21 22:06:38 -02:00
Khanh Ngo
c2df132040 Merge remote-tracking branch 'kaechele/use-webassets' 2018-06-13 09:58:15 +07:00
Khanh Ngo
aa6909065d Merge remote-tracking branch 'tmuncks/initial-accounts' 2018-06-12 16:17:55 +07:00
Felix Kaechele
1bf869f508 Add webassets support
Also updates AdminLTE to latest stable version.

Signed-off-by: Felix Kaechele <felix@kaechele.ca>
2018-06-11 21:16:28 +02:00
Jeroen Boonstra
689b25817c Add action to dialog 2018-06-08 13:25:43 +02:00
Jeroen Boonstra
e334749382 Add dialog for refresh status 2018-06-08 13:25:21 +02:00
Jeroen Boonstra
9732961854 Add refesh button 2018-06-08 13:23:04 +02:00
Khanh Ngo
6f54b1a9de Merge remote-tracking branch 'tmuncks/dnssec-admin-only' 2018-06-07 08:53:01 +07:00
Thomas M Steenholdt
ccec6c37b4 Restrict certain admin changes on the current user
Disable the admin toggle and delete operations from the current user, to avoid accidents.

(cherry picked from commit b0f5ac6df5d31f612dc833a88cfca8936c4137d7)
2018-06-06 09:15:25 -02:00
Thomas M Steenholdt
10f47039ec Add config option to allow DNSSEC changes only for admins
DNSSEC requires changes to the parent domain, which in many cases requires special access to a registry or the like.
For that reason, especially the option to disable DNSSEC can be dangerous - if DNSSEC is disabled in PowerDNS but not in the registry, the domain stops working.

For this reason, adding an option to disable DNSSEC changes for non-admins seems reasonable.

(cherry picked from commit 5cdfc0263b07f4658d51cf7c038fea9a8911152a)
2018-06-06 08:53:44 -02:00
Thomas M Steenholdt
a4af4ad4b3 Implement per account domain access
Added the possibility for assigning users to an account, providing access to all domains associated with that account automatically.

This makes management easier, especially in installations with lots of domains and lots of managing entities.

The old style per-domain permissions are still there and working as usual. The two methods work perfectly side-by-side and are analogous to "user" (per-domain) and "group" (account) permissions as we know them from Active Directory and such places.

(cherry picked from commit 34fbc634d2848a7f76dc89a03dd8c0604068cc17)
2018-06-05 16:42:44 -02:00
Thomas M Steenholdt
a3a58f16a5 Initial support for Accounts
This adds initial support for accounts a concept meant to signify a customer, a department or any other entity that somehow owns or manages one or more domains.

The purpose is to be able to assign an account to any number of domains, making it easy to track who owns or manages a domain, significantly improving manageability in setups with a large number of domains.

An account consists of a mandatory, unique `name` and optional `description`, `contact` name and `mail` address. The account `name` is stripped of spaces and symbols, and lower cased before getting stored in the database and in PowerDNS, to help ensure some type of predictability and uniqueness in the database.

The term *account* is actually taken from the PowerDNS database, where the `domains.account` column is used to store the account relationship, in in the form of the account `name`.

The link to a domain in PowerDNS-Admin is done through the `domain.account_id` FOREIGN KEY, that is linked to the `account.id` PRIMARY KEY.

(cherry picked from commits 4e95f33dfb0676d1c401a033c28bca3be7d6ec26, da0d596bd019a339549e2c59630a8fdee65d0e22, 7f06e6aaf4fd8011c784f24b7bbbba5f52aef319, 1c624dad8749024033d1d15dd6242ca52b39f135)
2018-06-04 13:10:02 -02:00
Thomas M Steenholdt
a7e91b6f40 Fix SOA-EDIT-API options
The options for SOA-EDIT-API included was actually the options used for SOA-EDIT, which is a very different beast.
Those options have been swapped out for the options allowed in SOA-EDIT-API and SOA-EDIT-DNSUPDATE.
2018-05-24 16:12:12 -02:00
Khanh Ngo
3d8d94f280 Validate registration process. Change copyright year. 2018-04-18 13:16:02 +07:00
Khanh Ngo
bd45c4ef87 Adjustment to have History sorts by oldest first. Fix #245 2018-04-18 12:11:00 +07:00
chinkung
be7e012faf
Display history date/time using local timezone 2018-04-17 13:30:08 +07:00
chinkung
34d8e7392c
Display history date/time using local timezone 2018-04-17 13:28:54 +07:00
chinkung
d466a5dd3e
Load moment.js in base.html 2018-04-17 13:26:18 +07:00
Khanh Ngo
01a5528c4a Merge remote-tracking branch 'mind04/template-relative' 2018-04-13 09:25:23 +07:00
Khanh Ngo
52b6966c83 Check zone serial before allowing user to submit their change. #183 2018-04-12 11:18:44 +07:00
Kees Monshouwer
a12af5345d
fix clear history 2018-04-12 02:11:34 +02:00
Khanh Ngo
5354d27f88 Fix #234 2018-04-08 09:09:08 +07:00
Khanh Ngo
ca1290d1ac Change license information 2018-04-02 14:01:35 +07:00
Khanh Ngo
17a892b18d Resolve the conflicts for #228 2018-04-02 13:38:53 +07:00
Khanh Ngo
6fa8ae37f0 Fix #180. Adjustment in table style. 2018-04-01 15:48:08 +07:00
Khanh Ngo
b7aefc57b2 Fix 169: enabling/disabling Two Factor Authentication doesn't work 2018-04-01 14:49:40 +07:00
Khanh Ngo
f172a64ddd Remove DNSSEC modal. Adjustment in domain table css 2018-04-01 14:45:13 +07:00
Khanh Ngo
5df7fe445f Emphasis on zone name 2018-04-01 14:32:20 +07:00
Khanh Ngo
29d1cf4117 Adjustment in domain template feature to work with python3 2018-03-31 08:21:02 +07:00
Khanh Ngo
ce6c3c21f1 Show user email address in user management table 2018-03-31 06:53:57 +07:00
Khanh Ngo
c668c21fc9 Adjustment to prevent exception in Google/Github authentication when local user cannot be created 2018-03-30 17:43:34 +07:00
Khanh Ngo
358510b4e5 Merge remote-tracking branch 'softcat/SRV' into development 2018-03-30 16:45:36 +07:00
Khanh Ngo
7a9474c3f3 Fix cancel button in domain adding page 2018-03-30 16:40:53 +07:00
Khanh Ngo
f318c437c1 Merge remote-tracking branch 'hackedd/feature/server-side-domain-list' into development 2018-03-30 15:34:07 +07:00
thomasDOTde
f5a0052a06 fixed template for #28 2018-03-28 14:19:48 +02:00
thomasDOTde
5ed8a33c7e added feature requested in issue #28 2018-03-28 01:41:33 +02:00
Jeroen Boonstra
197f555dfc Add disable dnssec function 2018-03-05 14:59:32 +01:00
Jeroen Boonstra
8c6a9346c0 Add domain to request 2018-03-05 14:50:33 +01:00
Jeroen Boonstra
747de090f9 enable dnssec ui functions 2018-03-05 11:18:29 +01:00
Jeroen Boonstra
d5d0948ab8 Export PDNS version to frontend 2018-02-28 13:39:05 +01:00
Vadim Aleksandrov
cff534890f Deny to delete 'SOA' record 2018-02-07 22:47:52 +03:00
Vadim Aleksandrov
0355fe4293 Join "Edit" and "Delete" button into th on templates page 2018-02-07 22:44:59 +03:00
Vadim Aleksandrov
12cfc4dbc1 Added the ability to create a template based on the zone records 2018-02-07 22:44:46 +03:00
Vadim Aleksandrov
52a5789c85 Add first working draft of domain templating functionality 2018-02-07 22:30:29 +03:00
Radnik
9855bc70dc Fixed iCheck for multiple pages 2017-11-27 11:02:21 +01:00
thomasDOTde
5a1a4b0161 Merge remote-tracking branch 'origin/master' 2017-11-03 12:24:54 +01:00
thomasDOTde
54e61bf072 added custom error page for SAML authentication errors 2017-11-03 12:24:25 +01:00
Thomas
cd6a58446d Merge pull request #9 from toxicvengeance/master
Add CAA record helper implemented by toxicvengeance
2017-11-03 00:32:12 +01:00
Thomas
83a0396350 Merge branch 'master' into feature-google-oauth 2017-11-01 22:18:43 +01:00
Thomas
e76063dbef Merge pull request #3 from thomasDOTde/fix-show-srvhelper
Corrected SRV record helper not showing
2017-11-01 21:59:48 +01:00
thomasDOTde
f92661c753 remove unnecessary controls from profile for ext. auth. 2017-11-01 13:40:26 +01:00
thomasDOTde
12c957bf5f disabled profile usage when authenticated externally 2017-11-01 01:34:29 +01:00
thomasDOTde
933d678e83 added SAML auth basics and metadata 2017-10-31 19:21:22 +01:00
patito
a4b9722d47 Google OAuth 2017-09-22 15:28:09 +01:00
Nils Sandmann
168f19950d Corrected SRV record helper not showing
Signed-off-by: Nils Sandmann <git@softcat.org>
2017-09-19 12:11:09 +02:00
Paul Hooijenga
a48417ac23 Add missing template 2017-09-04 15:34:01 +02:00
Paul Hooijenga
bcb2b06124 Do filtering and pagination of domains server-side. 2017-06-30 18:18:06 +02:00
toxicvengeance
5c5beec2d6 added default values 2017-05-10 23:25:32 +02:00
toxicvengeance
c9bfe00e59 added example caa values 2017-05-10 23:15:01 +02:00
toxicvengeance
300af22859 added caa record helper 2017-05-10 22:33:44 +02:00
Christopher Himmel
85694e4e93 added caa record helper 2017-05-10 22:30:06 +02:00
SIPOS, Peter
1538cf0239 Limit record selection in reverse lookup domain to PTR
And also fix the default type selection of a new record
2016-11-21 15:52:07 +01:00
SIPOS, Peter
4ec70f4143 Change serial displaying in dashboard
When pdns not give us serial just notified serial, we need
to display that.
2016-11-21 14:51:36 +01:00
SIPOS, Peter
bbfbe3683e Make my record modal inputs more clear
Add "eg." before the placeholder texts.
Some user missed to fill out the priority field, and
then they got errors.
2016-11-21 14:50:22 +01:00
SIPOS, Peter
85eaa8dd69 Add domain specific auto-dns preference to domain_management.html
It uses exactly the same method as the dyndns 
preferences. just copy-paste
2016-11-21 13:38:45 +01:00
Timo Salola
18ed4b528f Fix issue with deleting domain 2016-09-12 12:20:42 +00:00
Joachim Tingvold
9348afc26e Pretty history details. 2016-08-21 14:46:23 +00:00
Joachim Tingvold
4f5b2e5c50 Set focus to the first field when adding a new row. 2016-08-19 18:13:34 +00:00
Joachim Tingvold
480a00bb87 Fix issues when adding a record, and sort and/or search is involved.
Previously this caused the newly added record to either appear at the
bottom, or not appear at all. Now it will always be added at the top,
and whatever search present is cleared.
2016-08-19 17:56:28 +00:00
Chuyen Vo
4a1d2055de Fix domain delete action if uwsgi path mount is not /
For ex: mount = /pdsn-admin=run.py
2016-08-15 15:06:16 +07:00
CMGS
186aedcfc7 github oauth login 2016-08-13 00:49:46 +08:00
Khanh Ngo
ee033f2198 Add Gravatar to display user's avatar 2016-07-13 21:33:21 +07:00
Ivan Filippov
4a0cb0a637 Apply scriptroot_fix to new DynDNS domain setting javascript. 2016-07-05 21:36:54 -06:00
Ivan Filippov
ea79c01aff Added SCRIPT_ROOT parameter. Fixes #52.
Adds a new javascript parameter that holds the webroot of the app. This
allows the the javascript calls to properly identify that they're
running in a subfolder/different webroot and direct their queries there.
2016-07-05 21:34:21 -06:00
Khanh Ngo
ff842f66e2 Merge pull request #77 from jallakim/default-settings
Settings: Default domain table size + LDAP first/selected if both LDAP+Basic
2016-07-06 09:30:56 +07:00
Khanh Ngo
b94ae55960 Merge pull request #73 from jallakim/naturalsort
Fix #72 by implementing the Natural Sort plugin for DataTables.
2016-07-06 09:24:22 +07:00
Ivan Filippov
f912968759 Fix create_via_dyndns template setting. 2016-07-05 19:22:57 -06:00
Ivan Filippov
d093c1976d Add per-domain settings. Allows ondemand dyndns A records. Fixes #61.
This commit adds a new table to store per-domain settings, so a database
migrate/upgrade will be required. The first use-case is to allow dyndns
updates to create a record if one doesn't yet exist but only if the
per-domain setting is set.
2016-07-05 19:22:57 -06:00
Joachim Tingvold
9dc3c3ff98 Set LDAP as source if both LDAP and Basic is enabled. 2016-07-05 15:28:02 +00:00
Joachim Tingvold
ea42c78b9a default_domain_table_size setting. 2016-07-05 15:14:41 +00:00
Joachim Tingvold
2411659437 NaturalSort for Datatables. 2016-07-04 17:48:46 +00:00
Joachim Tingvold
db4edb81bf Use natural sort for domain records. 2016-07-04 19:28:42 +02:00
Khanh Ngo
54954082c5 Change dnssec status button size 2016-07-04 22:40:29 +07:00
Ivan Filippov
70b8e76d1d Fix width of DNSSEC buttons. Make Enabled button green. Fixes #68. 2016-07-03 13:27:11 -06:00
Ivan Filippov
9794e221aa Replace direct 'click' event binding with delegated binding. Fixes #58.
Direct binding only works for elements already in the DOM, delegated
binding works for all elements that match a filter even if created after
the DOM is fully loaded.
2016-07-01 16:31:14 -06:00