WP Capabilities to Add Media, Use Media, But Not Edit Them

What you are asking is default behaviour for the author role. So you don’t have to do anything.

When an author is in the process of inserting somebody else’s media in his post, it looks like he can edit the properties, but this is only true for that current post. If he changes, for instance, the alt attribute, he will get a different alt attribute only for his own post. You could try to prevent that in the media manager, but that doesn’t make sense, because when the html is inserted into the post, the author can change the attributes anyway.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)