Commit Graph

7338 Commits

Author SHA1 Message Date
Pea Tyczynska
86d8464fa2 Show all users in folder viewing permissions, correct users checked 2019-03-18 17:58:53 +00:00
Pea Tyczynska
e85969f6fa Change folder viewing permissions from manage folder page 2019-03-18 17:52:02 +00:00
Pea Tyczynska
1ab36dd026 Show checkboxes for users with permission to view the managed folder 2019-03-15 14:13:27 +00:00
Pea Tyczynska
077a533d81 Subheader for edit users who can see a folder 2019-03-14 17:21:18 +00:00
Pea (Malgorzata Tyczynska)
d5a16195d9 Merge pull request #2845 from alphagov/invite-auth-bug
Fix choosing auth type when inviting new user
2019-03-14 13:05:40 +00:00
Pea Tyczynska
a9be6015dc Test if auth type can be chosen while inviting user 2019-03-12 16:53:46 +00:00
Pea Tyczynska
5aa72daf9b Fix bug 2019-03-12 11:41:52 +00:00
Pea (Malgorzata Tyczynska)
2bc6792c5a Merge pull request #2823 from alphagov/hide-folders-when-no-permissions
Only show folders that user has permission to see
2019-03-11 16:26:56 +00:00
Pea Tyczynska
577e25bd52 Explain the workings of get_user_template_folders 2019-03-11 14:30:50 +00:00
Pea Tyczynska
347955a378 Make sure that only templates inside visible folders are considered
When filtering by template type we should ignore any templates that
are inside folders user does not have permission for. Otherwise the
parent folder can show up as empty instead of not showing up at
all. This adds check for user_permissions to is_folder_visible on
the service model in admin.
2019-03-11 14:30:50 +00:00
Pea Tyczynska
33c3b14feb Test how user folder permissions work on the page 2019-03-11 14:30:50 +00:00
Alexey Bezhan
3d401ce856 Hide current folder templates if user doesn't have a folder permission
TemplateList gets a list of templates in a current folder separately,
so we need to make sure `service.get_templates` checks for the
appropriate user permission
2019-03-11 14:30:50 +00:00
Alexey Bezhan
70e6732255 Only display folders the user has permission for
This adds a filter by user permissions to the list of template folders
displayed in:

* the 'choose a template page'
* "Move to" form to choose a destination folder
* "Copy an existing template" selection form
2019-03-11 14:30:50 +00:00
Alexey Bezhan
6638a0aecb Add user_id argument to TemplateList to allow filtering folders by user
Switches TemplateList to use get_user_template_folders by setting the
user_id.
2019-03-11 14:30:50 +00:00
Alexey Bezhan
80bfd8e347 Add space around folder name separator when flattening folder path 2019-03-11 14:30:49 +00:00
Alexey Bezhan
1fb7a2515f Return all templates for the user if the folder permissions flag is off
Putting the permission check in the get_user_template_folders allows
us to replace `all_template_folders` usage with the new method without
having to worry about the temporary service permission flag.
2019-03-11 14:30:49 +00:00
Pea Tyczynska
de237e9e6f Test that folders are filtered based on user permission at service level 2019-03-11 14:30:49 +00:00
Katie Smith
1f6ca7c480 Merge pull request #2836 from alphagov/delete-unused-functions
Delete unused functions and their tests
2019-03-11 10:34:35 +00:00
Pete Herlihy
f437d222ff Merge pull request #2842 from alphagov/lewishamhomes.org.uk
Adding lewishamhomes.org.uk to the list of email domains
2019-03-11 10:31:16 +00:00
Katie Smith
e4edddbeab Delete unused functions and their tests 2019-03-11 10:27:38 +00:00
Pete Herlihy
9eb7e7d176 Adding lewishamhomes.org.uk to the list of email domains 2019-03-11 10:10:23 +00:00
Chris Hill-Scott
99edd15a94 Merge pull request #2839 from alphagov/680-services
680 services ad 215 organisations
2019-03-08 16:00:10 +00:00
Pete Herlihy
0a9051f4b6 And one more late breaker.... ;) 2019-03-08 15:33:20 +00:00
Pete Herlihy
f91a7792cb 680 services ad 215 organisations 2019-03-08 15:30:17 +00:00
Chris Hill-Scott
5dfd6a57ea Merge pull request #2838 from alphagov/fix-extra-go-live-task-logic
Fix the logic about showing extra task list items
2019-03-08 15:27:15 +00:00
Chris Hill-Scott
1af844c95f Fix the logic about showing extra task list items
It should be:
- if they have said they are going to send by a certain channel, show
  the extra required task(s) for that channel
- if they haven’t said, infer from which templates they have
2019-03-08 15:21:41 +00:00
Chris Hill-Scott
d1844aac33 Merge pull request #2820 from alphagov/tabular-number-entry
Use tabular font for numeric fields
2019-03-08 13:58:42 +00:00
Chris Hill-Scott
cd59919ad1 Merge pull request #2827 from alphagov/depend-on-service-volumes
When going live, make reply-to address and text message sender dependent on estimated sending volumes
2019-03-08 13:56:49 +00:00
Pea Tyczynska
87fb3944ce Get template folders visible to the current user
get_template_folders can filter out folders invisible to a user
2019-03-07 16:21:34 +00:00
Chris Hill-Scott
97335a11ff Merge pull request #2831 from alphagov/fix-duplicate-hint-in-list
Fix hint text for list entry being rendered twice
2019-03-07 14:07:49 +00:00
Chris Hill-Scott
aca3a2086f Merge pull request #2835 from alphagov/birminghamcc
Birminghamcc
2019-03-07 10:13:03 +00:00
Pete Herlihy
b6c51d6863 Adding Birmingham CC to the list of signed contracts 2019-03-07 10:04:23 +00:00
Pete Herlihy
725dea2da0 Adding Birmingham CC to the list of signed contracts 2019-03-07 10:04:01 +00:00
Chris Hill-Scott
0c1996e82b Merge pull request #2833 from alphagov/cheshirewestandchester.gov.uk
Mark agreement signed by Cheshire West and Chester Council
2019-03-07 09:31:24 +00:00
Chris Hill-Scott
1c59438072 Merge pull request #2834 from alphagov/torfaen.gov.uk
Mark agreement signed by Torfaen County Borough Council
2019-03-07 09:31:07 +00:00
Chris Hill-Scott
710ce46812 Mark agreement signed by Torfaen County Borough Council 2019-03-07 09:20:37 +00:00
karlchillmaid
a33c1932f8 Merge pull request #2822 from alphagov/privacy-updates
Update privacy statement
2019-03-07 09:02:23 +00:00
Chris Hill-Scott
e45eb718a9 Mark agreement signed by Cheshire West and Chester Council 2019-03-06 16:34:10 +00:00
Chris Hill-Scott
b8888aa408 Fix hint text for list entry being rendered twice
The better place for it, semantically, is inside the legend.
2019-03-06 15:35:24 +00:00
karlchillmaid
eaad921acb Update date
Update date
2019-03-05 14:41:43 +00:00
Rebecca Law
2916a3fea2 Merge pull request #2819 from alphagov/edit-folder-permissions
Edit user folder permissions
2019-03-05 12:08:40 +00:00
Alexey Bezhan
a2389fe2ca Make folder permissions form label more descriptive 2019-03-05 11:45:50 +00:00
Alexey Bezhan
6fa975e867 Send updated user folder permissions to the API
Integrates the folder permissions form with the updated API endpoint
to store changes in the user folders.

Since user folder permissions are returned in the full list of template
folders for the service we need to invalidate the cache key for it each
time we update user permissions.
2019-03-05 11:44:34 +00:00
Alexey Bezhan
3ba4a22b7c Add checkboxes-nested CSS rules 2019-03-05 11:44:34 +00:00
Pea Tyczynska
7413423243 Display nested folders permissions form on user permissions page
We're reusing the logic for the `move_to` nested radios field for the
user folder permissions nested checkboxes.

The main difference between the two forms (aside from the different
input type) is that "Move" form contains the root "Templates" as an
option, whereas the folder permissions doesn't.

It turns out that, because of the way NestedFieldMixin.children and
select_nested macro are implemented the easiest way to get the desired
folder permissions behaviour is to add the root folder as a choice with
a `None` value and `NONE_OPTION_VALUE = None` set on the field, which
allows the `child_map` to be constructed but doesn't display the root
folder checkbox itself since it gets overwritten in the final `child_map`.
2019-03-05 11:44:34 +00:00
Pea Tyczynska
340fd021bb Move field definitions before form definitions 2019-03-05 11:44:34 +00:00
Alexey Bezhan
194756bc2e Make radio form components reusable for nested checkboxes
For the template folders permission editing we need a nested
checkboxes form that is similar to "move folder" input, except
it's using checkboxes instead of radio buttons.

This moves most of the macros into a shared "select-input" components
file, which are wrapped by the existing radios.html by setting the
required input type.
2019-03-05 11:44:34 +00:00
Chris Hill-Scott
3900b675dc Correct email link typo
Co-Authored-By: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2019-03-05 11:26:31 +00:00
Chris Hill-Scott
87c62e6c52 Only hide channel-specific tasks if volume is 0
If you have email templates but haven’t told us what volumes you’re
sending we should assume you are going to send emails. We should only
stop asking you to add a reply-to address once you’ve told us for sure
you’re not going to send any emails.

This also applies to changing the text message sender – this should only
be hidden if you don’t have text message templates or you’ve said you’re
not going to be sending any text messages.
2019-03-05 11:03:21 +00:00
karlchillmaid
263a19df02 Updated formatting of contact information
Updated formatting of contact information to bring it in line with GOV.UK style
2019-03-05 10:15:39 +00:00