Something that can sometimes open

I'm something that can sometimes open
I'm not just a word, in case you assumed so.
You can use me to enter, taking an option
If you don't use me, straight through you will go.

But most of the time I don't open.
Rather, I do certain things.
If some container to be inside does happen
or the situation allows...
Only then can I open.

Hint 1:

The 8th line is very helpful.

• Has a correct answer been given? If so, please don't forget to $\color{green}{\checkmark \small\text{Accept}}$ it. If not, some responses to the answerers to help steer them in the right direction would be helpful. – Rubio Apr 18 '17 at 6:33

Are you the

Lock Screen

I'm something that can sometimes open

Mobile lock screens can be opened if the password or pattern is known.

I'm not just a word, in case you assumed so.

Two words. Lock and Screen.

You can use me to enter, taking an option

You can access a mobile using lock screen

If you don't use me, straight through you will go.

If no lock screen is set, you can go straight through to use phone.

But most of the time I don't open.

But these days, most of the mobile phones has a lock screen and won't open without the correct password or pattern

Rather, I do certain things. If some container to be inside does happen or the situation allows... Only then can I open.

May be referring to the access to emergency call and other such emergency stuff that are open for all without unlocking.

• The last two might be referring to the snippets that apps have accessible from the locked screen. Such snippets give you insight into what happened without even needing to unlock. – David Starkey Mar 29 '17 at 14:00

You might be

an ideal logic gate.

I'm something that can sometimes open

Logic gates can be thought of as literally "gates" which are "open" if they give the binary output 1.

I'm not just a word, in case you assumed so.

Indeed: "logic gate" is two words.

You can use me to enter, taking an option

You need to "take an option", i.e. choose a binary input, before approaching the gate.

If you don't use me, straight through you will go.

Without a logic gate, there's no real way of processing the binary inputs and you just go straight through without anything interesting happening.

But most of the time I don't open.

Logic gates can give the binary output 0 instead of 1; this corresponds to being "closed".

Rather, I do certain things.

They process binary inputs.

If some container to be inside does happen
or the situation allows...
Only then can I open.

They can only open under certain circumstances. I'm not sure what the "container" refers to.

Are you a

Lock?

I'm something that can sometimes open

Locks open, but only if you have a key

I'm not just a word, in case you assumed so.

Just here for the rhyme?

You can use me to enter, taking an option

you need to choose to open a lock

If you don't use me, straight through you will go.

A door without a lock is easy to get through

But most of the time I don't open.

Not without a key it doesn't

Rather, I do certain things.

Protects, shields, keeps safe...

If some container to be inside does happen or the situation allows... Only then can I open.

Some locks open depending on other situations, suck as codes and fingerprints.

• The "obvious" solutions are indeed incorrect. – user_194421 Mar 29 '17 at 12:24

(shot in the dark) Are you ...

A (support) ticket?

Because:

I'm something that can sometimes open.

A support ticket can be opened when a bug occurs.

I'm not just a word, in case you assumed so.
You can use me to enter, taking an option

A ticket is also a touchable object to enter an attraction/concert/...

But most of the time I don't open. Rather, I do certain things. If some container to be inside does happen or the situation allows... Only then can I open.

A support ticket can only be opened when i.e. a (software) bug occurs. You don't open most of the times though, because people will use you in other states (in progress, waiting for customer to test or done)

This is not likely, because:
If you don't use me, straight through you will go.

If you DO use a ticket, you DO should get through instead.

Are you a

I'm something that can sometimes open

Password can be used to open digital volts and storages

I'm not just a word, in case you assumed so.

Two words. Pass and Word

You can use me to enter, taking an option

A user can use the password to access the user area if a registered user.

If you don't use me, straight through you will go.

Can access the guest area straight away without taking you to the login page.

But most of the time I don't open.

Most cases you will need a password

Rather, I do certain things. If some container to be inside does happen or the situation allows... Only then can I open.

For some applications, there will be some complex mechanisms along with password to get it opened.