Commit Graph

52 Commits

Author SHA1 Message Date
a7a97a53f1 Added API listing filtering & cleaned ApiAuthenticate returns
API listing endpoint filter can be found via &filter[name]=my+book query
parameters. There are a range of operators that can be used such as
&filter[id:gte]=4
2020-01-01 16:33:47 +00:00
3d11cba223 Added testing coverage to API token auth 2019-12-30 19:42:46 +00:00
6f1b88a6a6 Change email confirmation from own middle to trait
Email confirmation middleware caused more mess than good, As caused
priority issues and it depended on auth actions. Instead its now a trai
used on auth middlewares.

Also used 'EncryptCookies' middleware on API instead of custom
decryption in custom middleware since we'd need to do replicate all the
same actions anyway. Shouldn't have too much effect since it only
actions over cookies that exist, of which none should be there for most
API requests.

Also split out some large guard functions to be a little more readable
and appease codeclimate.
2019-12-30 15:49:20 +00:00
349b4629be Extracted API auth into guard
Also implemented more elegant solution to allowing session auth for API
routes; A new 'StartSessionIfCookieExists' middleware, which wraps the
default 'StartSession' middleware will run for API routes which only
sets up the session if a session cookie is found on the request. Also
decrypts only the session cookie.

Also cleaned some TokenController codeclimate warnings.
2019-12-30 14:51:28 +00:00
3de55ee645 Linked new API token system into middleware
Base logic in place but needs review and refactor to see if can better
fit into Laravel using 'Guard' system. Currently has issues due to
cookies in use from active session on API.
2019-12-30 02:16:07 +00:00
23a716a3ac Fix "Declaration of Middleware\TrustProxies::handle should be compatible with Fideloper\Proxy\TrustProxies::handle" 2019-11-20 14:00:20 +03:00
3a17ba2cb9 Started using OneLogin SAML lib directly
- Aligned and formatted config options.
- Provided way to override onelogin lib options if required.
- Added endpoints in core bookstack routes.
- Provided way to debug details provided by idp and formatted by
bookstack.
- Started on test work
- Handled case of email address already in use.
2019-11-17 13:26:43 +00:00
f1d7699df5 Updated Korean to be correct country code 2019-10-18 14:27:41 +01:00
df98deb59d Added Turkish to locale system 2019-10-17 14:01:19 +01:00
31f5786e01 Entity Repo & Controller Refactor (#1690)
* Started mass-refactoring of the current entity repos

* Rewrote book tree logic

- Now does two simple queries instead of one really complex one.
- Extracted logic into its own class.
- Remove model-level akward union field listing.
- Logic now more readable than being large separate query and
compilation functions.

* Extracted and split book sort logic

* Finished up Book controller/repo organisation

* Refactored bookshelves controllers and repo parts

* Fixed issues found via phpunit

* Refactored Chapter controller

* Updated Chapter export controller

* Started Page controller/repo refactor

* Refactored another chunk of PageController

* Completed initial pagecontroller refactor pass

* Fixed tests and continued reduction of old repos

* Removed old page remove and further reduced entity repo

* Removed old entity repo, split out page controller

* Ran phpcbf and split out some page content methods

* Tidied up some EntityProvider elements

* Fixed issued caused by viewservice change
2019-10-05 12:55:01 +01:00
2a2cc858f0 Refactored notification showing and global view data 2019-09-19 15:12:10 +01:00
be08dc1588 Ran phpcbf and updated helpers typehinting 2019-09-15 18:29:51 +01:00
6917ea088f Upgraded app to Laravel 5.7 2019-09-06 23:36:16 +01:00
213e9d2941 Upgraded to Laravel 5.6 2019-09-06 22:14:39 +01:00
666213a4d4 Removed html dir tag for now, Updated lang format 2019-08-18 18:57:35 +01:00
3acea12f1c Merge branch 'unicode' of git://github.com/kostasdizas/BookStack into kostasdizas-unicode 2019-08-18 18:51:20 +01:00
4b0c4e621a Replaced use of custom 'baseUrl' helper with 'url'
Also changed up how base URL setting was being done
by manipulating incoming request URLs instead of
altering then on generation.
2019-08-04 14:26:39 +01:00
86f56dd22b Added locale and text direction to html templates 2019-06-11 23:01:08 +01:00
282c45f088 Updated roadmap & dev version, removed dupe locale mappings 2019-06-11 22:45:41 +01:00
5f2d226f09 Merge branch 'master' into 2019-design 2019-03-10 21:40:02 +00:00
98a4359198 Updated user language select to use correct default
- Updated localisation system to take note of system defaul locale
before replacing the current locale
Fixes #1316
2019-03-07 21:09:23 +00:00
3286f29a61 Merge branch 'master' into 2019-design 2019-02-09 14:58:38 +00:00
5325870271 Updated auth pages to new design, Removed public layout 2019-02-03 17:34:15 +00:00
36424a24b5 Added ability for date format strings to be localized by back-end
Requires the locale to be installed on the system-side.
Closes #1214
2019-01-19 12:11:18 +00:00
257a5a23ec Fleshed out entity provided and optimized imports 2018-09-25 16:58:03 +01:00
1cb6ae39c8 Added base RTL support
For #939

- Adds way to check if current language is RTL via config system.
- Made TinyMCE default direction be based on current language text
direction.
- Fixed bullet points to be RTL compatible.
- Set page content body to have direction based on content.
2018-09-22 13:18:26 +01:00
fcb93dc7c8 Added option to disable public lang autodetect
Also cleaned up localization middleware a little.
Closes #944
2018-08-12 13:10:55 +01:00
62342433f4 Set /app PHP code to PSR-2 standard
Also adde draw.io to attribution list.

Closes #649
2018-01-28 16:58:52 +00:00
56d5af1336 Made it possible to configure proxies via env
In reference to #146
2017-12-07 19:46:47 +00:00
873b1099f8 Updated to laravel 5.5
Closes #590
2017-11-19 15:56:19 +00:00
d89440d198 Fixed required email confirmation with domain restriction
Added test to cover scenario.

Closes #573
2017-11-11 18:09:48 +00:00
c943eb4d0d Removed empty string null middleware as was causing issues 2017-09-30 14:44:52 +01:00
aca6de49b0 Added missing middleware to trim input 2017-09-30 14:31:27 +01:00
ad4642c2c4 Enabled translation when not logged in
Reads from the Accept-Language HTTP header.
Also fixed some encoding for ES translations.

Fixes #375
2017-04-29 16:47:41 +01:00
26da81a3b0 Added pt_BR to language dropdown and renamed folder 2017-01-18 20:04:29 +00:00
dabf149411 Added user setting system and added user-lang option
Supports #115
2017-01-15 16:27:24 +00:00
bab27462ab Fixed issue where default user was over-fetched 2017-01-01 17:33:06 +00:00
9dc9724e15 Laravel 5.3 upgrade (#189)
* Started move to laravel 5.3

* Started updating login & registration flows for laravel 5.3 update

* Updated app emails to notification system

* Fixed registations bugs and removed email confirmation model

* Fixed large portion of laravel post-upgrade issues

* Fixed and tested LDAP process
2016-09-17 18:22:04 +01:00
632ecc668f Applied baseUrl to login redirect 2016-08-15 15:07:45 +01:00
43d9d2eba7 Updated all application urls to allow path prefix.
Allows BookStack to be installed at a non-root location on a domain.
Closes #40.
2016-08-14 12:29:35 +01:00
2bb8c3d914 Made email confirmations work with LDAP auth
The email_confirmed user field now actually indicates if an email is confirmed rather than defaulting to true if not checked.
 This ensures toggleing the 'Require email confirmation' setting actually makes all currently unconfirmed users confirm thier emails.
2016-04-03 12:16:54 +01:00
66c56e9d02 Added settings helper and formatted code in some files 2016-03-06 12:55:08 +00:00
0821672e70 Cleaned tests up, Started LDAP tests, Created LDAP wrapper 2016-01-15 23:21:47 +00:00
88049476fe Change application namespace to BookStack 2015-09-10 19:31:09 +01:00
dec0cbb1b2 Got standard form-based registration working 2015-09-05 20:25:57 +01:00
2c3fb557d6 Started social registration 2015-09-05 17:42:05 +01:00
eac7378ce0 Made social accounts attachable 2015-09-04 20:40:36 +01:00
ee8795dcda Added options to allow whole site to be made public. Fixes #3. 2015-08-31 12:29:48 +01:00
ae95d0a239 Added permission system 2015-08-29 15:03:42 +01:00
fc50a1400d Added User managment. Fixes #5 2015-08-08 20:05:30 +01:00