Ghost
New
pippinmole
/
ghost
public
forked from
ghost/ghost
Source code of Ghost - On Ghost
Star
0
Fork
0
Code
Issues
0
Pull requests
0
main
76
branches
Go to file
t
Code
ghost
apps
api
src
lib
github
permission.ts
api: GitHub Repository type and REST repository and readme routes
3ebc919
3 days ago
8 lines · 351 B
1
import
type
{
Role
}
from
'
@ghost/permissions
'
;
2
3
/**
GitHub has no `owner` permission; a repository's owner holds ADMIN there.
*/
4
export
function
repositoryPermissionOf
(
role
5
if
(
!
role
)
6
if
(
role
===
7
return
role
.
toUpperCase
8
}
:
Role
|
null
)
{
return
null
;
'
owner
'
||
role
===
'
admin
'
)
return
'
ADMIN
'
;
()
as
'
MAINTAIN
'
|
'
WRITE
'
|
'
TRIAGE
'
|
'
READ
'
;