Commit Graph

985 Commits

Author SHA1 Message Date
Kevin Chung
ca4144ffc4 Merge remote-tracking branch 'origin/3.1.0-dev' into 756-generic-data-fields 2020-08-19 19:46:27 -04:00
Kevin Chung
0bc58d5af1 Add pagination to /api/v1/comments (#1614)
* Add pagination to `/api/v1/comments` 
* Update CommentBox component to have pagination buttons
* Closes #1599
2020-08-19 19:42:56 -04:00
Kevin Chung
b29d928459 Stop using deprecated func 2020-08-19 16:28:37 -04:00
Kevin Chung
493a4c717d Add small test for admins to see all fields 2020-08-19 16:09:08 -04:00
Kevin Chung
3b798b92cc 756 user field tests (#1613)
One more test
2020-08-19 15:59:34 -04:00
Kevin Chung
9c2692e3ee Add some initial testing for user facing field items (#1611)
* Add tests for user facing field manipulation and displaying
2020-08-19 04:57:32 -04:00
Kevin Chung
283be54009 Run yarn build 2020-08-19 01:46:55 -04:00
Kevin Chung
9294158636 Add migration 2020-08-19 00:57:05 -04:00
Kevin Chung
319e2d1c96 Remove extra parens 2020-08-19 00:34:09 -04:00
Kevin Chung
b26774810d 751 config fields interface (#1607)
* Add API for fields at `/api/v1/configs/fields`
* Add interface to manipulate fields from the Admin Panel
2020-08-19 00:17:25 -04:00
Kevin Chung
f7de0c71a5 Add special casing for affiliation and website fields 2020-08-19 00:09:51 -04:00
Kevin Chung
607fa37b98 Fix tests 2020-08-18 21:04:55 -04:00
Kevin Chung
12f0b5b3e6 Run formatter 2020-08-18 20:49:05 -04:00
Kevin Chung
733e438d1e Remove bold labels from admin panel custom user fields 2020-08-18 20:39:34 -04:00
Kevin Chung
9d72e3ba21 Fix ingestion of boolean custom fields 2020-08-18 20:38:28 -04:00
Kevin Chung
37a250223b Add rendering of boolean fields 2020-08-18 17:51:46 -04:00
Kevin Chung
4950f83922 Add TeamFields and TeamFieldEntries 2020-08-18 17:18:31 -04:00
Kevin Chung
fa10060a6e Start seperating out FieldEntries into types 2020-08-18 17:06:45 -04:00
Kevin Chung
e68419201a Clean up theme user.fields access 2020-08-18 15:33:59 -04:00
Kevin Chung
aa15c63050 FieldEntries field should be joined 2020-08-18 15:30:39 -04:00
Kevin Chung
8c261f5f6f Extra form.extra rendering into a macro 2020-08-18 15:28:34 -04:00
Kevin Chung
d5c71423ba Extract extra property into a shared function 2020-08-18 14:59:18 -04:00
Kevin Chung
925c5dfdc8 Extract custom user field attachment into seperate function 2020-08-18 14:42:45 -04:00
Kevin Chung
beaea4f1d2 Remove comments from Fields model 2020-08-18 14:19:29 -04:00
Kevin Chung
f18a8e4010 Import modules properly 2020-08-18 14:16:19 -04:00
Kevin Chung
1eaf450cdb Show descriptions and optional fields 2020-08-18 14:11:04 -04:00
Kevin Chung
681a86b15c Fix some glitches with removing values 2020-08-17 15:44:02 -04:00
Kevin Chung
96c50f26b1 Fix issue with partially updating field data 2020-08-17 03:51:45 -04:00
Kevin Chung
baa5918134 Start changing fields to user fields 2020-08-17 02:15:00 -04:00
Kevin Chung
376aaa943c Remove comments 2020-08-17 01:59:02 -04:00
Kevin Chung
0f38e8d07f Prevent editting of non-editable fields 2020-08-17 01:56:02 -04:00
Kevin Chung
7601a52c3b Working implementation 2020-08-16 23:14:59 -04:00
Kevin Chung
cd12d5df7e Handle processing field entries from admin panel and add permissions to viewing fields 2020-08-16 18:14:55 -04:00
Kevin Chung
3d390dfe86 Expunge user object before manipulation so that we don't persist changes to the db 2020-08-15 18:20:10 -04:00
Kevin Chung
5a4397bc56 Add boolean defaults 2020-08-15 17:47:25 -04:00
Kevin Chung
acc4f3e346 Add Marshmallow handling of fields and add permissions for fields 2020-08-15 17:40:12 -04:00
Kevin Chung
682caba26f Rename field names 2020-08-15 14:09:55 -04:00
Kevin Chung
b0f85aef26 Add mostly untested way to update field values via API 2020-08-15 03:35:16 -04:00
Kevin Chung
f88d9dd340 Add some more progress 2020-08-15 01:57:36 -04:00
Kevin Chung
bf8095ed60 Start working on arbitrary user fields 2020-08-14 17:32:17 -04:00
Kevin Chung
5215db995f Fix GitHub actions and add comments table (#1604)
* Fix MySQL and Postgres GitHub actions to properly test databases
* Add migration to add `comments` table
2020-08-14 03:13:12 -04:00
Kevin Chung
b9831d96b5 Try to access the mysql container port 2020-08-14 01:51:21 -04:00
Kevin Chung
12a83bebea Update database hostnames 2020-08-14 01:30:14 -04:00
Kevin Chung
c9de517966 Properly test under other databases with Github Actions 2020-08-14 01:21:04 -04:00
Kevin Chung
92a40b6eff Loosen team password confirmation to also accept team captain password (#1598)
* Loosen team password confirmation to also accept team captain password
* Make team settings modal larger in the core theme
* Add help text in team settings form
* Closes #1545
2020-08-13 14:08:44 -04:00
Kevin Chung
da4357b07b Make scoreboard caching only cache the score table (#1586)
* Make scoreboard caching only cache the score table instead of the entire page
* Closes #1584
2020-08-13 11:53:36 -04:00
Kevin Chung
58e38c4bde Add page comments (#1601)
* Add comments to Page editors
2020-08-13 11:52:14 -04:00
Kevin Chung
fab661d144 Add comments section to admin users/teams pages. (#1600)
* Add a comments section for a user's page in the Admin Panel
* Move user graphs into a modal for Admin Panel
* Create a new webpack JS chunk for the admin section for the Vue components (`components.js`)
  - Not really sure why webpack needed this to be separated out
* Closes #1052
2020-08-13 11:15:12 -04:00
Kevin Chung
b73433e1c9 321 comments functionality (#1596)
* Add a comments functionality for admins to discuss challenges, users, teams, pages
* Adds `/api/v1/comments`
* Adds a `CommentBox.vue` component for the Admin Panel
* Closes #321
2020-08-12 19:55:47 -04:00
Kevin Chung
6559846452 Mark 3.0.1 (#1594)
# 3.0.1 / 2020-08-12

**General**

- Fix issue where admins could not see user graphs/api data if score visibility was set to hidden

**Admin Panel**

- Allow the Admin Panel Submissions page to filter by Account IDs, Challenge IDs, and Challenge Names
- Link to correct submissions for challenge from the challenge page

**API**

- Fix regression for creating hints via ctfcli. See #1582 for details. https://github.com/CTFd/CTFd/issues/1582.
- Deprecate `CTFd.api.v1.helpers.models.build_model_filters` and wrap it to `CTFd.utils.helpers.models.build_model_filters`

**Themes**

- Fix team pages to use the correct core errors component

**Plugins**

- Fix issues with previewing challenges under some challenge type plugins

**Deployment**

- Values specified in `config.ini` will now supercede values specified via environment variable. Config behavior is as follows:
  1. Config Key exists in `config.ini` and is set to a value. That value becomes the app config.
  2. Config Key exists in `config.ini` but is set to an empty string. An envvar with the same name is looked up. The envvar's value is used as the app config.
  3. If the envvar is not found, fall back to the default specified value in `config.py`
  4. If there is no default, use None or an empty string
3.0.1
2020-08-12 12:35:32 -04:00