1
0
mirror of https://github.com/flarum/core.git synced 2025-07-15 05:46:24 +02:00
Commit Graph

118 Commits

Author SHA1 Message Date
32aa163844 Remove LIKE and raw from viewUserList rename 2021-06-28 11:58:23 +02:00
6e05406f45 Include updating of scoped tag permissions
Addresses https://github.com/flarum/core/issues/2924

The rename `viewDiscussions` migration introduced for Flarum 1.0 does not take tag scoped permissions into account
032db2c146/migrations/2021_05_10_000000_rename_permissions.php (L17)

This adds a new migration to additionally rename `tagX.viewDiscussions` to `tagX.viewForum`

Tested locally on an upgrade from core `beta.16` to `1.0.3`
2021-06-28 11:58:23 +02:00
795918c274 Revert "Revert "Squash core migrations (#2842)""
This reverts commit 3a524e6845.
2021-05-31 15:49:20 +02:00
3a524e6845 Revert "Squash core migrations (#2842)"
This reverts commit 03e4f31bda.
2021-05-29 22:38:25 +02:00
bd33954a57 Rename viewDiscussions => viewForum, viewUserList => searchUsers (#2854)
This naming is clearer as to the intended effect. Changes include:

- A migration to rename all permissions
- Updating the seed migration to use the original naming from the start
- Replacing usage of the old names with new names in code
- Throwing warnings when the old names are used.
2021-05-11 15:15:27 -04:00
03e4f31bda Squash core migrations (#2842)
Data migrations (seed default groups, seed default permissions) are deliberately excluded.
This also allows us to remove a lot of now unnecessary public API from the migrator and migration repository.
2021-05-10 18:05:01 -04:00
9a3f579cbb Rename relevant migration so it runs again (#2793) 2021-04-19 14:14:07 -04:00
1699ac3355 Add id to migrations table (#2794) 2021-04-19 10:35:21 -04:00
bc0ed8803d Remove MyISAM Requirement (#2442)
- Remove Database Engine Default of InnoDB
- Remove Hard Coded MyISAM requirement
2021-04-09 08:13:47 -04:00
965b713a27 Refactor Access Tokens (#2651)
- Make session token-based instead of user-based
- Clear current session access tokens on logout
- Introduce increment ID so we can show tokens to moderators in the future without exposing secrets
- Switch to type classes to manage the different token types. New implementation fixes #2075
- Drop ability to customize lifetime per-token
- Add developer access keys that don't expire. These must be created from the database for now
- Add title in preparation for the developer token UI
- Add IP and user agent logging
- Delete all non-remember tokens in migration
2021-03-04 16:50:38 -05:00
aa3d50c590 Don't create user bio column on new installations (#2215) 2020-07-01 17:31:52 -04:00
7dd5c92c31 Implement hidden permission groups (#2129)
Only users that have the new `viewHiddenGroups` permissions will be able to see these groups.

You might want this when you want to give certain users special permissions, but don't want to make your authorization scheme public to regular users.

Co-authored-by: luceos <daniel+github@klabbers.email>
2020-04-21 17:49:53 +02:00
085d3cdba6 Change default discussion comment count
This allows new public discussions to be immediately visible by users.
2020-04-08 01:13:52 +02:00
a2cc49b1d9 Use Laravel's slugger for basic transliteration
This is better than the current system, as it adds transliteration rules
for special characters, rather than just throwing all of them away.

For languages that cannot be transliterated to ASCII in a reasonable
manner, more possible improvements are outlined in #194.
2020-01-24 17:40:09 +01:00
5020a3a927 Apply fixes from StyleCI
[ci skip] [skip ci]
2019-11-28 00:16:50 +00:00
ea03909fb2 Apply fixes from StyleCI
[ci skip] [skip ci]
2019-11-18 09:23:53 +01:00
2bb554e93b Remove 'or' from 'orWhereNotExists' 2019-11-18 09:23:53 +01:00
19c79c9dd3 Add discussion_id foreign key to posts table 2019-11-18 09:23:53 +01:00
0b7c611715 fixes #1801, increasing the size of posts.content to mediumText correctly 2019-06-24 14:53:56 +02:00
f0287c376a Fix table name in migration 2019-01-31 22:01:05 +01:00
0273bf78db Remove obsolete dropForeign() migration
Forgotten in commit cbc95e42dd.
2019-01-31 22:00:41 +01:00
b5bc2b2e87 further revert #41688c7 2019-01-15 20:49:06 +01:00
d56ea1ef07 reverts #41688c7 2019-01-15 20:39:38 +01:00
c23b7f33eb Migrations: Fix dropping foreign keys
Passing an array to dropForeign does not mean dropping multiple indices,
but rather dropping a key on multiple tables.

Passing a string means that this string will be interpreted as index
name, not as name of the indexed column. Passing an array with one
string is therefore correct, in order to benefit from automatic index
name generation.
2018-11-30 14:02:37 +01:00
41688c73f8 Fix index names in migrations
This can be reverted when we upgrade to Laravel 5.7.
2018-11-27 12:19:13 +10:30
5f785c9473 Add migration to add 'fa fa-' to group icons (#1597)
* Add migration to add 'fa fa-' (FA v4 shim) to group icons

* StyleCI

* Change prefix to `fas fa-`
2018-10-10 00:39:19 +02:00
cb9cf29ab8 Merge pull request #1577 from flarum/tz/database-indices
Database indices
2018-09-24 23:49:23 +02:00
46ef76266a Allow admins to see last online text (#1540)
* Allow admins to see last online text

* Use viewLastSeenAt permission

* Move permission to UserSerializer, removed from ForumSerializer

* Remove extra comma from ForumSerializer to keep diff clean

* Add permission to new seed migration
2018-09-22 23:55:53 +02:00
0c429c1b9f Auth token and avatarUrl security improvements (#1514)
* Remove AbstractOAuth2Controller

There is no reason to provide an implementation for a specific oAuth2
library in core; it's not generic enough (eg. auth-twitter can't use it).

This code could be moved into another package which auth extensions
depend on, but it's a negligible amount of relatively simple code that
I don't think it's worth the trouble.

* Introduce login providers

Users can have many login providers (a combination of a provider name
and an identifier for that user, eg. their Facebook ID).

After retrieving user data from a provider (eg. Facebook), you pass the
login provider details into the Auth\ResponseFactory. If an associated
user is found, a response that logs them in will be returned. If not, a
registration token will be created so the user can proceed to sign up.
Once the token is fulfilled, the login provider will be associated with
the user.
2018-09-22 13:48:27 +09:30
0617ed747b Add database indices. closes #127 2018-09-15 14:32:51 +09:30
a7f4297214 Fix query error 2018-09-15 12:44:59 +09:30
cd4d22e42b Inline permissions migration 2018-09-15 12:40:32 +09:30
8b2781829f Remove user_user table
Since there is currently no core code that facilitates use of this table,
we are removing it for now. It can be re-added in a subsequent PR.
2018-08-24 15:15:40 +09:30
ccb1321dca Apply fixes from StyleCI
[ci skip] [skip ci]
2018-08-01 03:55:21 +00:00
fdcb78a48c Change TIMESTAMP columns to DATETIME manually 2018-08-01 13:24:55 +09:30
a13175600f Fix group/permission seeding
Updating the Migration::addPermission helper table name means we need
to move the seed migration to after the table rename migration. We also
add a sanity check for each permission's group since the foreign key
will fail if the group doesn't exist. Of course, the only way to make
sure groups are seeded before permissions is to move them into another
migration.
2018-07-21 23:02:44 +09:30
05c8e12761 Wrap column names; use whereColumn where possible 2018-07-21 22:02:54 +09:30
7474290138 Merge branch 'master' into 1236-database-changes
# Conflicts:
#	src/Forum/Controller/IndexController.php
#	src/User/UserMetadataUpdater.php
2018-07-21 21:37:49 +09:30
6df532bac7 Revert notifications_from table
I didn't think this change through and it's going to be too difficult
to implement right now. It can wait until we do the notifications
revamp. For now reverting back to the old structure, with the
`sender_id` column renamed to `from_user_id`.
2018-07-21 18:35:50 +09:30
e8cd2d4111 Fix entity deletion
Foreign keys take care of most of this for us!
2018-07-21 17:18:40 +09:30
f52d5f2ccf No need for deleted_at in notifications table 2018-07-21 17:13:51 +09:30
36b272d183 Change TIMESTAMP columns to DATETIME 2018-07-21 17:12:51 +09:30
33973fdb78 Clean up migrations
* Make filenames and order more consistent

* Split foreign keys into their own migrations, add statements to ensure
  data integrity prior to adding them

* Add renameColumns helper, use other helpers where possible
2018-07-21 15:23:37 +09:30
39501f1dd0 resetting to short annotation for dropping foreign key constraint, as per docs, must use array notation for this to work 2018-07-20 09:35:16 +02:00
34e7355c58 fixed another foreign key drop with incorrect name 2018-07-20 09:24:42 +02:00
9d13aae115 forgot to name a few constraints properly on the dropForeign statement 2018-07-20 09:23:03 +02:00
cbc95e42dd decided to leave the posts.discussion_id foreign key constraint to discussions out for now 2018-07-20 08:41:01 +02:00
aca0f3c57a added constraints, discussions_first_post_id_foreign blocks here 2018-07-19 10:36:46 +02:00
ccd4729011 instead of changing fulltext, use medium text schema builder change on posts.content 2018-07-19 09:52:20 +02:00
cb89203ac5 remove migration (initially was intended) to change settings.value to longblob 2018-07-19 09:45:29 +02:00