aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorMs Kimsible <1877318+kimsible@users.noreply.github.com>2021-08-25 11:38:10 +0200
committerGitHub <noreply@github.com>2021-08-25 11:38:10 +0200
commit4e1592daa41f81667f914f37d36795e8c6c046c3 (patch)
tree8bed3af237b6d5d4da08af989c3824a168e6f3b6 /server
parent644800ef5588e08da2a8227f6d72751d3dca85db (diff)
downloadPeerTube-4e1592daa41f81667f914f37d36795e8c6c046c3.tar.gz
PeerTube-4e1592daa41f81667f914f37d36795e8c6c046c3.tar.zst
PeerTube-4e1592daa41f81667f914f37d36795e8c6c046c3.zip
Alert user for low quota and video auto-block on upload page (#4336)
* Replace wording of instance contact * Add contact-us button to no-quota alert on upload page * Add alert for accounts with auto-blocked videos on upload page * Add alert for accounts without enough quota + refacto on upload page * Using ng-container and ng-template * Add alert for daily quota * Add hook filter for upload page alert messages * Add instance name as subtitle in contact modal * Fix eslint max-len on string * Fix missing word in quota left daily message - upload page Co-authored-by: Kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'server')
-rw-r--r--server/models/user/user.ts2
-rw-r--r--server/tests/api/users/users.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/models/user/user.ts b/server/models/user/user.ts
index 20696b1f4..069d7266e 100644
--- a/server/models/user/user.ts
+++ b/server/models/user/user.ts
@@ -958,7 +958,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
958 } 958 }
959 959
960 toMeFormattedJSON (this: MMyUserFormattable): MyUser { 960 toMeFormattedJSON (this: MMyUserFormattable): MyUser {
961 const formatted = this.toFormattedJSON() 961 const formatted = this.toFormattedJSON({ withAdminFlags: true })
962 962
963 const specialPlaylists = this.Account.VideoPlaylists 963 const specialPlaylists = this.Account.VideoPlaylists
964 .map(p => ({ id: p.id, name: p.name, type: p.type })) 964 .map(p => ({ id: p.id, name: p.name, type: p.type }))
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index 1419ae820..318ff832a 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -290,7 +290,7 @@ describe('Test users', function () {
290 expect(user.account.description).to.be.null 290 expect(user.account.description).to.be.null
291 } 291 }
292 292
293 expect(userMe.adminFlags).to.be.undefined 293 expect(userMe.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST)
294 expect(userGet.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST) 294 expect(userGet.adminFlags).to.equal(UserAdminFlag.BYPASS_VIDEO_AUTO_BLACKLIST)
295 295
296 expect(userMe.specialPlaylists).to.have.lengthOf(1) 296 expect(userMe.specialPlaylists).to.have.lengthOf(1)