Commit graph

9 commits

Author SHA1 Message Date
Rémy Coutable
e531a0c11c
Use the new CacheableAttributes concern in the ApplicationSetting and Appearance models
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-23 16:14:43 +02:00
Jan Provaznik
7da3b2cdd0 Delete remote uploads
ObjectStore uploader requires presence of associated `uploads` record
when deleting the upload file (through the carrierwave's after_commit
hook) because we keep info whether file is LOCAL or REMOTE in `upload`
object.

For this reason we can not destroy uploads as "dependent: :destroy" hook
because these would be deleted too soon. Instead we rely on
carrierwave's hook to destroy `uploads` in after_commit hook.

But in before_destroy hook we still have to delete not-mounted uploads
(which don't use carrierwave's destroy hook). This has to be done in
before_Destroy instead of after_commit because `FileUpload` requires
existence of model's object on destroy action.

This is not ideal state of things, in a next step we should investigate
how to unify model dependencies so we can use same workflow for all
uploads.

Related to #45425
2018-05-16 08:58:07 +02:00
Markus Koller
b8a3931925
Add custom brand text on new project pages 2017-12-04 17:22:59 +01:00
Grzegorz Bizon
6a4dd05190 Optimize a few simple spec files by using set 2017-09-13 13:35:18 +02:00
Yorick Peterse
26bb50412c
Cache Appearance instances in Redis
This caches the result of Appearance.first in a similar fashion to how
ApplicationSetting instances are cached. We also add some NOT NULL
constraints to the table and correct the timestamp types.

Fixes gitlab-org/gitlab-ce#36066, fixes gitlab-org/gitlab-ce#31698
2017-08-10 12:45:49 +02:00
Keifer Furzland
7e113b6824 Remove superfluous type defs in specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:52 +02:00
Robert Speicher
23c2b8f6bb Add has_many associations for models that can have Upload records 2017-03-06 14:41:10 -05:00
Semyon Pupkov
31c41a8fe1 Use build instead create record in appearance_spec 2016-10-12 10:50:01 +05:00
Zeger-Jan van de Weg
9a2869ab46 Branded login page also in CE
The only major difference with the EE version is the change from a light and dark logo to only a header logo
The dark logo wasn't used anyway, so it seemed to make sense to me to rename the field to the actual function of it
2016-02-26 15:50:51 +01:00