hide permission tab when empty

I did it from php by moving the permission code above the tab