The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Custom Power up t.attach function giving "Uncaught Error: User lacks write permission on card."

Trello User
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2018

I'm creating a custom power up which requires me to use card buttons to attach a link to the card, however I keep getting the above error whenever I call t.attach function. I authorized the user with read and write permissions using the following url:

"https://trello.com/1/authorize?expiration=never&name=[App-name]&scope=read,write&key=[api-key]&callback_method=fragment&return_url=https%3A%2F%2F' + window.location.host + '%2Fauth-success"

 

After much debugging, I found that "t.memberCanWriteToModel('card')" returns true when the user is authorized. After the authorization window closes and the flow returns to the default app, the function returns false.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Trello User
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2018

I figured it out. The page that was calling the t.attach method was loaded using window.location instead of t.popup method

TAGS
AUG Leaders

Atlassian Community Events