Checking Permission and sending to permission denied page