FEATURE: multiple use invite links (PR #9813)

would prefer readOnly here

          .catch(error => {

Thanks for the review @jjaffeux! Working through the comments now.

Looks like we do not.

copy./paste turned bad :stuck_out_tongue:

Good idea. Made it so.

Excellent suggestion! Made it so.

Good catch! Fixed.

Sure, done!

It’s not being used anywhere else… also we use the same pattern for checking for “pending” and “redeemed” tabs, so I am not sure about this.

1 Like

Done.

Done.

I basically copied the same implementation we have in create-account.js.

I made the changes you suggested here.

Are we returning 2 different formats of json depending on params?

1 Like

dependent: :delete_all on invited_users

1 Like

name is not ideal … max_redemptions_allowed maybe?

1 Like

does this mean invites have 2 expirys?

1 Like

ColumnDropper is only useful if you need .mark_readonly or you are disabling ddl transaction. In this case you are doing neither, so you can simply drop the column. also be sure to add something like this:

https://github.com/discourse/discourse/blob/a2d939608d5b3adc7f037dc0ca38e7d1f6b895f6/app/models/topic.rb#L13-L14

1 Like

500 … we don’t want 500 errors

https://github.com/discourse/discourse/blob/a2d939608d5b3adc7f037dc0ca38e7d1f6b895f6/spec/requests/topics_controller_spec.rb#L481-L481

1 Like
  disabled(isAdmin, saving, canInviteTo) {
1 Like