YAFLogo

finarfin.palantir
12 years ago
Hey guys,

We're currently running version 1.9.5.5 and I've been stumped by the access masks... Basically we have 2 separate forums on the same board with a corresponding role for each forum. These roles have been created with the member access mask for the forum it's targeted at and the no access mask on the rest of the forums.

I now have a user who needs to see both forums, rather than just one, so I've added the user to both roles thinking the "highest" access mask will be applied... He still only sees the forum corresponding to the first role he was in. I have his login details and have tested it on my side as well, same result, just the one forum.

I then thought it might be something funny on the user account so I've created a third Role and a new user account and tested the scenario again using the new user, same result. (I have cleared the cache just to make sure this isn't something YAF is loading from the cache)

For now I can probably carry on by creating one role with permissions for both forums, but we'll probably end up with about 10 different forums for this and having a role for each possible combination doesn't really seem all that viable, I was hoping someone could point me in the right direction?

I've checked the documentation and searched within the forums but I can't find anything remotely relevant, the video Jaben put up tells me this should pretty much be working with a default installation, not sure what we've messed up on our way here, any advice would be appreciated?

Sponsor
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
There is a Moderate button In the topics view - you can assign an access mask individually for each user for a forum.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
12 years ago

Hey guys,

We're currently running version 1.9.5.5 and I've been stumped by the access masks... Basically we have 2 separate forums on the same board with a corresponding role for each forum. These roles have been created with the member access mask for the forum it's targeted at and the no access mask on the rest of the forums.

I now have a user who needs to see both forums, rather than just one, so I've added the user to both roles thinking the "highest" access mask will be applied... He still only sees the forum corresponding to the first role he was in. I have his login details and have tested it on my side as well, same result, just the one forum.

I then thought it might be something funny on the user account so I've created a third Role and a new user account and tested the scenario again using the new user, same result. (I have cleared the cache just to make sure this isn't something YAF is loading from the cache)

For now I can probably carry on by creating one role with permissions for both forums, but we'll probably end up with about 10 different forums for this and having a role for each possible combination doesn't really seem all that viable, I was hoping someone could point me in the right direction?

I've checked the documentation and searched within the forums but I can't find anything remotely relevant, the video Jaben put up tells me this should pretty much be working with a default installation, not sure what we've messed up on our way here, any advice would be appreciated?

Originally Posted by: finarfin.palantir 

It looks like yaf has a problem handling users that are part of multiple roles, I noticed that before.

As workaround you could create a third role and a extra access mask that has access to both forums instead of assigning the user to both roles.

finarfin.palantir
12 years ago
I can, in the sense that I don't actually receive any sort of error on the page or in the event log. I was able to search for the user and grant them access seemingly without a problem, however, the new access mask didn't take effect at all...

I've just tried to update that user from the member access mask to the read only access mask but then I actually receive an error message stating : "Sorry, user "{0}" is not a registered on this forum."

So I'm assuming that's the direction you wanted me to head into?

I'll probably have to fire up the debugger and see if anyone changed something from the original source code, doing a solution wide search should point me in the right direction...

Thanks :)

PS: If you have any suggestions on where to start looking I'd appreciate it?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago

I've just tried to update that user from the member access mask to the read only access mask but then I actually receive an error message stating : "Sorry, user "{0}" is not a registered on this forum."

Originally Posted by: finarfin.palantir 

Enable display names. It's a bug in YAF it's fixed in the current repository.

finarfin.palantir
12 years ago

I've just tried to update that user from the member access mask to the read only access mask but then I actually receive an error message stating : "Sorry, user "{0}" is not a registered on this forum."

Originally Posted by: bbobb 

Enable display names. It's a bug in YAF it's fixed in the current repository.

Originally Posted by: finarfin.palantir 

Uhm, display names are enabled?

I'll fire up a debugger and see if I can get more info on this from there, we do have a Windows Service that assigns users to the correct roles, so my line of thought is still that this is more related to the data we're feeding it than a YAF bug, I could be wrong, but anything I say at this stage would be an assumption rather than based on facts.

For now as a workaround I'm going to take a look at creating a third role, but as this forum grows I'll need to find a more permanent solution for it, is this already assigned to be fixed (I couldn't find anything on the issue in the tracker?) or would you advise that I dig into the solution and fix it there?

If I do fix this how would this impact installing updates in future?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago

If I do fix this how would this impact installing updates in future?

Originally Posted by: finarfin.palantir 

You possibly will option to submit a patch.

finarfin.palantir
12 years ago

I've just tried to update that user from the member access mask to the read only access mask but then I actually receive an error message stating : "Sorry, user "{0}" is not a registered on this forum."

Originally Posted by: bbobb 

Enable display names. It's a bug in YAF it's fixed in the current repository.

Originally Posted by: finarfin.palantir 

I've just downloaded the source and I can see why you suggested enabling display names in mod_forumuser.ascx.cs :)

I have a funny feeling there's more to my issue than that though and quite possibly some data we mucked up while importing users/switching roles.

I'll download the DB and files from the server and set it up locally then hook up the debugger, I'll get back to this post with my findings, it's either going to be data we're missing in which case this might help someone else in future or going to include the bug fix which might help someone else in future.

Thanks for the responses guys, much appreciated.