@@ -69,7 +69,7 @@ var addSessionCommand = cli.Command{
69
69
Usage : "session type to be created which will " +
70
70
"determine the permissions a user has when " +
71
71
"connecting with the session. Options " +
72
- "include readonly|admin|custom" ,
72
+ "include readonly|admin|account| custom" ,
73
73
Value : "readonly" ,
74
74
},
75
75
cli.StringSliceFlag {
@@ -85,6 +85,13 @@ var addSessionCommand = cli.Command{
85
85
"For example, '/lnrpc\\ ..*' will result in " +
86
86
"all `lnrpc` permissions being included." ,
87
87
},
88
+ cli.StringFlag {
89
+ Name : "account_id" ,
90
+ Usage : "The account id that should be used for " +
91
+ "the account session. Note that this flag " +
92
+ "will only be used if the 'type' flag is " +
93
+ "set to 'account'." ,
94
+ },
88
95
},
89
96
}
90
97
@@ -122,6 +129,7 @@ func addSession(ctx *cli.Context) error {
122
129
MailboxServerAddr : ctx .String ("mailboxserveraddr" ),
123
130
DevServer : ctx .Bool ("devserver" ),
124
131
MacaroonCustomPermissions : macPerms ,
132
+ AccountId : ctx .String ("account_id" ),
125
133
},
126
134
)
127
135
if err != nil {
@@ -139,6 +147,8 @@ func parseSessionType(sessionType string) (litrpc.SessionType, error) {
139
147
return litrpc .SessionType_TYPE_MACAROON_ADMIN , nil
140
148
case "readonly" :
141
149
return litrpc .SessionType_TYPE_MACAROON_READONLY , nil
150
+ case "account" :
151
+ return litrpc .SessionType_TYPE_MACAROON_ACCOUNT , nil
142
152
case "custom" :
143
153
return litrpc .SessionType_TYPE_MACAROON_CUSTOM , nil
144
154
default :
0 commit comments