SQL> Select logins from v$instance;
If the database is restricted mode then it will return RESTRICTED otherwise it will return ALLOWED.