1
00:00:01,790 --> 00:00:10,250
In this video, we are going to hide the edit and then the delete icon for not authorized user.

2
00:00:10,280 --> 00:00:17,300
So the same concept as we did for post updates and delete is going to be the same concept.

3
00:00:17,990 --> 00:00:22,250
You can see that this post does not belong to the log in user.

4
00:00:22,250 --> 00:00:26,390
That is why we don't see the edits and then the delete icon.

5
00:00:26,750 --> 00:00:32,450
So let's go ahead and copy the same concept as we did for the post details.

6
00:00:32,450 --> 00:00:42,200
So let's get back to post and post details and let's screw up for the actions icons, which is this.

7
00:00:42,200 --> 00:00:47,300
Here we are comparing the author of the Post to the log in user.

8
00:00:47,300 --> 00:00:53,510
So if we're comments, we are going to compare the author of the comment and then the log in user.

9
00:00:53,630 --> 00:01:02,000
So let's go ahead and implement the same thing for the comment action icons and it start from here and

10
00:01:02,000 --> 00:01:02,900
ends here.

11
00:01:03,260 --> 00:01:05,780
So let's make a check.

12
00:01:07,500 --> 00:01:08,370
ACA.

13
00:01:09,350 --> 00:01:10,160
Eve.

14
00:01:11,900 --> 00:01:25,520
The comment dot user dot underscore ID is equal to the log in user which is user of.

15
00:01:26,910 --> 00:01:29,700
And let's convict everything to string.

16
00:01:31,170 --> 00:01:34,620
For comparison as to string.

17
00:01:40,080 --> 00:01:40,860
Right.

18
00:01:42,910 --> 00:01:45,490
Let's close the aegis.

19
00:01:47,790 --> 00:01:48,810
As that.

20
00:01:48,810 --> 00:01:53,820
And let me cut the icons and place it inside here.

21
00:01:54,360 --> 00:01:57,300
So let's go ahead and refresh the page.

22
00:01:58,320 --> 00:02:04,330
And you can see that I don't see the icons because these comments does not belong to me.

23
00:02:04,350 --> 00:02:12,600
There is a log in user can see the author is IMA, but if I go to my profile page I am NDI.

24
00:02:12,780 --> 00:02:13,320
All right.

25
00:02:13,320 --> 00:02:14,550
That is it, guys.

