@@ -87,7 +87,8 @@ use self::{
87
87
RepositoryKind , RepositoryService , UpdateIntegrationInput ,
88
88
} ,
89
89
setting:: {
90
- NetworkSetting , NetworkSettingInput , SecuritySetting , SecuritySettingInput , SettingService ,
90
+ BrandingSetting , NetworkSetting , NetworkSettingInput , SecuritySetting ,
91
+ SecuritySettingInput , SettingService ,
91
92
} ,
92
93
user_event:: { UserEvent , UserEventService } ,
93
94
web_documents:: { CreateCustomDocumentInput , CustomWebDocument , WebDocumentService } ,
@@ -422,6 +423,12 @@ impl Query {
422
423
ctx. locator . setting ( ) . read_security_setting ( ) . await
423
424
}
424
425
426
+ async fn branding_setting ( ctx : & Context ) -> Result < BrandingSetting > {
427
+ let license = ctx. locator . license ( ) . read ( ) . await ?;
428
+ license. ensure_available_features ( license:: LicenseFeature :: CustomLogo ) ?;
429
+ ctx. locator . setting ( ) . read_branding_setting ( ) . await
430
+ }
431
+
425
432
async fn git_repositories (
426
433
& self ,
427
434
ctx : & Context ,
@@ -1375,6 +1382,18 @@ impl Mutation {
1375
1382
Ok ( true )
1376
1383
}
1377
1384
1385
+ async fn update_branding_setting (
1386
+ ctx : & Context ,
1387
+ input : setting:: BrandingSettingInput ,
1388
+ ) -> Result < bool > {
1389
+ check_admin ( ctx) . await ?;
1390
+ let license = ctx. locator . license ( ) . read ( ) . await ?;
1391
+ license. ensure_available_features ( license:: LicenseFeature :: CustomLogo ) ?;
1392
+ input. validate ( ) ?;
1393
+ ctx. locator . setting ( ) . update_branding_setting ( input) . await ?;
1394
+ Ok ( true )
1395
+ }
1396
+
1378
1397
async fn delete_email_setting ( ctx : & Context ) -> Result < bool > {
1379
1398
check_admin ( ctx) . await ?;
1380
1399
ctx. locator . email ( ) . delete_setting ( ) . await ?;
0 commit comments